Changeset 48937 for trunk/tests/phpunit/tests/post/nav-menu.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/nav-menu.php
r48858 r48937 41 41 ); 42 42 43 $this->assert Equals( 0, strpos( $menu, '<ul' ) );43 $this->assertSame( 0, strpos( $menu, '<ul' ) ); 44 44 } 45 45 … … 157 157 // Confirm it saved properly. 158 158 $custom_item = wp_setup_nav_menu_item( get_post( $custom_item_id ) ); 159 $this->assert Equals( 'Wordpress.org', $custom_item->title );159 $this->assertSame( 'Wordpress.org', $custom_item->title ); 160 160 161 161 // Update the orphan with an associated nav menu. … … 170 170 $custom_item = wp_filter_object_list( $menu_items, array( 'db_id' => $custom_item_id ) ); 171 171 $custom_item = array_pop( $custom_item ); 172 $this->assert Equals( 'WordPress.org', $custom_item->title );172 $this->assertSame( 'WordPress.org', $custom_item->title ); 173 173 174 174 } … … 219 219 set_theme_mod( 'nav_menu_locations', $locations ); 220 220 221 $this->assert Equals( 'My Menu', wp_get_nav_menu_name( 'primary' ) );221 $this->assertSame( 'My Menu', wp_get_nav_menu_name( 'primary' ) ); 222 222 } 223 223 … … 248 248 $nav_menus_names = wp_list_pluck( wp_get_nav_menus(), 'name' ); 249 249 250 $this->assert Equals( $nav_menus_names, $expected_nav_menus_names );250 $this->assertSame( $nav_menus_names, $expected_nav_menus_names ); 251 251 } 252 252 … … 280 280 $post_type_archive_item = wp_setup_nav_menu_item( get_post( $post_type_archive_item_id ) ); 281 281 282 $this->assert Equals( $post_type_slug, $post_type_archive_item->title );283 $this->assert Equals( $post_type_description, $post_type_archive_item->description );282 $this->assertSame( $post_type_slug, $post_type_archive_item->title ); 283 $this->assertSame( $post_type_description, $post_type_archive_item->description ); 284 284 } 285 285 … … 311 311 $post_type_archive_item = wp_setup_nav_menu_item( get_post( $post_type_archive_item_id ) ); 312 312 313 $this->assert Equals( $post_type_slug, $post_type_archive_item->title );314 $this->assert Equals( $post_type_description, $post_type_archive_item->description ); // Fail!313 $this->assertSame( $post_type_slug, $post_type_archive_item->title ); 314 $this->assertSame( $post_type_description, $post_type_archive_item->description ); // Fail! 315 315 } 316 316 … … 346 346 $post_type_archive_item = wp_setup_nav_menu_item( get_post( $post_type_archive_item_id ) ); 347 347 348 $this->assert Equals( $post_type_slug, $post_type_archive_item->title );349 $this->assert Equals( $menu_item_description, $post_type_archive_item->description );348 $this->assertSame( $post_type_slug, $post_type_archive_item->title ); 349 $this->assertSame( $menu_item_description, $post_type_archive_item->description ); 350 350 } 351 351 … … 724 724 ) 725 725 ); 726 $this->assert Equals( 'auto-draft', get_post_status( $auto_draft_post_id ) );727 $this->assert Equals( 'draft', get_post_status( $draft_post_id ) );728 $this->assert Equals( 'private', get_post_status( $private_post_id ) );726 $this->assertSame( 'auto-draft', get_post_status( $auto_draft_post_id ) ); 727 $this->assertSame( 'draft', get_post_status( $draft_post_id ) ); 728 $this->assertSame( 'private', get_post_status( $private_post_id ) ); 729 729 wp_delete_post( $wp_customize->changeset_post_id(), true ); 730 730 $this->assertFalse( get_post_status( $auto_draft_post_id ) ); 731 $this->assert Equals( 'trash', get_post_status( $draft_post_id ) );732 $this->assert Equals( 'private', get_post_status( $private_post_id ) );731 $this->assertSame( 'trash', get_post_status( $draft_post_id ) ); 732 $this->assertSame( 'private', get_post_status( $private_post_id ) ); 733 733 } 734 734 … … 944 944 945 945 $custom_item = wp_setup_nav_menu_item( get_post( $custom_item_id ) ); 946 $this->assert Equals( $correct_url, $custom_item->url );946 $this->assertSame( $correct_url, $custom_item->url ); 947 947 } 948 948
Note: See TracChangeset
for help on using the changeset viewer.