Changeset 35225 for trunk/tests/phpunit/tests/customize/nav-menus.php
- Timestamp:
- 10/16/2015 09:04:12 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/customize/nav-menus.php
r35162 r35225 23 23 parent::setUp(); 24 24 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; 25 wp_set_current_user( $this->factory->user->create( array( 'role' => 'administrator' ) ) );25 wp_set_current_user( self::$factory->user->create( array( 'role' => 'administrator' ) ) ); 26 26 global $wp_customize; 27 27 $this->wp_customize = new WP_Customize_Manager(); … … 125 125 126 126 // Create pages. 127 $this->factory->post->create_many( 12, array( 'post_type' => 'page' ) );127 self::$factory->post->create_many( 12, array( 'post_type' => 'page' ) ); 128 128 129 129 // Home is included in menu items when page is zero. … … 146 146 147 147 // Create page. 148 $post_id = $this->factory->post->create( array( 'post_title' => 'Post Title' ) );148 $post_id = self::$factory->post->create( array( 'post_title' => 'Post Title' ) ); 149 149 150 150 // Create pages. 151 $this->factory->post->create_many( 10 );151 self::$factory->post->create_many( 10 ); 152 152 153 153 // Expected menu item array. … … 176 176 177 177 // Create page. 178 $page_id = $this->factory->post->create( array( 'post_title' => 'Page Title', 'post_type' => 'page' ) );178 $page_id = self::$factory->post->create( array( 'post_title' => 'Page Title', 'post_type' => 'page' ) ); 179 179 180 180 // Expected menu item array. … … 202 202 203 203 // Create post. 204 $post_id = $this->factory->post->create( array( 'post_title' => 'Post Title' ) );204 $post_id = self::$factory->post->create( array( 'post_title' => 'Post Title' ) ); 205 205 206 206 // Expected menu item array. … … 228 228 229 229 // Create term. 230 $term_id = $this->factory->category->create( array( 'name' => 'Term Title' ) );230 $term_id = self::$factory->category->create( array( 'name' => 'Term Title' ) ); 231 231 232 232 // Expected menu item array. … … 280 280 // Create posts 281 281 $post_ids = array(); 282 $post_ids[] = $this->factory->post->create( array( 'post_title' => 'Search & Test' ) );283 $post_ids[] = $this->factory->post->create( array( 'post_title' => 'Some Other Title' ) );282 $post_ids[] = self::$factory->post->create( array( 'post_title' => 'Search & Test' ) ); 283 $post_ids[] = self::$factory->post->create( array( 'post_title' => 'Some Other Title' ) ); 284 284 285 285 // Create terms 286 286 $term_ids = array(); 287 $term_ids[] = $this->factory->category->create( array( 'name' => 'Dogs Are Cool' ) );288 $term_ids[] = $this->factory->category->create( array( 'name' => 'Cats Drool' ) );287 $term_ids[] = self::$factory->category->create( array( 'name' => 'Dogs Are Cool' ) ); 288 $term_ids[] = self::$factory->category->create( array( 'name' => 'Cats Drool' ) ); 289 289 290 290 // Test empty results … … 387 387 do_action( 'customize_register', $this->wp_customize ); 388 388 $menu_id = wp_create_nav_menu( 'Primary' ); 389 $post_id = $this->factory->post->create( array( 'post_title' => 'Hello World' ) );389 $post_id = self::$factory->post->create( array( 'post_title' => 'Hello World' ) ); 390 390 $item_id = wp_update_nav_menu_item( $menu_id, 0, array( 391 391 'menu-item-type' => 'post_type',
Note: See TracChangeset
for help on using the changeset viewer.