- Timestamp:
- 11/30/2017 11:09:33 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php
r38588 r42343 39 39 include_once ABSPATH . 'wp-admin/includes/nav-menu.php'; 40 40 41 self::factory()->post->create_many( 3, array( 'post_type' => 'page', 'post_content' => 'foo' ) ); 42 self::factory()->post->create( array( 'post_type' => 'page', 'post_content' => 'bar' ) ); 41 self::factory()->post->create_many( 42 3, array( 43 'post_type' => 'page', 44 'post_content' => 'foo', 45 ) 46 ); 47 self::factory()->post->create( 48 array( 49 'post_type' => 'page', 50 'post_content' => 'bar', 51 ) 52 ); 43 53 44 54 $request = array( … … 66 76 set_current_screen( 'nav-menu.php' ); 67 77 68 self::factory()->post->create( array( 'post_type' => 'post', 'post_status' => 'publish', 'post_title' => 'Publish', 'post_content' => 'FOO' ) ); 69 self::factory()->post->create( array( 'post_type' => 'post', 'post_status' => 'draft', 'post_title' => 'Draft', 'post_content' => 'FOO' ) ); 70 self::factory()->post->create( array( 'post_type' => 'post', 'post_status' => 'pending', 'post_title' => 'Pending', 'post_content' => 'FOO' ) ); 71 self::factory()->post->create( array( 'post_type' => 'post', 'post_status' => 'future', 'post_title' => 'Future', 'post_content' => 'FOO', 'post_date' => gmdate( 'Y-m-d H:i:s', strtotime( '+1 month' ) ) ) ); 78 self::factory()->post->create( 79 array( 80 'post_type' => 'post', 81 'post_status' => 'publish', 82 'post_title' => 'Publish', 83 'post_content' => 'FOO', 84 ) 85 ); 86 self::factory()->post->create( 87 array( 88 'post_type' => 'post', 89 'post_status' => 'draft', 90 'post_title' => 'Draft', 91 'post_content' => 'FOO', 92 ) 93 ); 94 self::factory()->post->create( 95 array( 96 'post_type' => 'post', 97 'post_status' => 'pending', 98 'post_title' => 'Pending', 99 'post_content' => 'FOO', 100 ) 101 ); 102 self::factory()->post->create( 103 array( 104 'post_type' => 'post', 105 'post_status' => 'future', 106 'post_title' => 'Future', 107 'post_content' => 'FOO', 108 'post_date' => gmdate( 'Y-m-d H:i:s', strtotime( '+1 month' ) ), 109 ) 110 ); 72 111 73 112 $request = array( 74 113 'type' => 'quick-search-posttype-post', 75 'q' => 'FOO',114 'q' => 'FOO', 76 115 ); 77 $output = get_echo( '_wp_ajax_menu_quick_search', array( $request ) );116 $output = get_echo( '_wp_ajax_menu_quick_search', array( $request ) ); 78 117 79 118 $this->assertNotEmpty( $output );
Note: See TracChangeset
for help on using the changeset viewer.