Changeset 48937 for trunk/tests/phpunit/tests/term/wpGetObjectTerms.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/wpGetObjectTerms.php
r47122 r48937 21 21 // Set the initial terms. 22 22 $tt_1 = wp_set_object_terms( $post_id, $terms_1, $this->taxonomy ); 23 $this->assert Equals( 3, count( $tt_1 ) );23 $this->assertSame( 3, count( $tt_1 ) ); 24 24 25 25 // Make sure they're correct. … … 32 32 ) 33 33 ); 34 $this->assert Equals( $terms_1_slugs, $terms );34 $this->assertSame( $terms_1_slugs, $terms ); 35 35 } 36 36 … … 48 48 $terms = wp_get_object_terms( array( $post_id1, $post_id2 ), 'category' ); 49 49 $this->assertCount( 2, $terms ); 50 $this->assert Equals( array( $cat_id, $cat_id2 ), wp_list_pluck( $terms, 'term_id' ) );50 $this->assertSame( array( $cat_id, $cat_id2 ), wp_list_pluck( $terms, 'term_id' ) ); 51 51 52 52 $terms2 = wp_get_object_terms( … … 59 59 60 60 $this->assertCount( 3, $terms2 ); 61 $this->assert Equals( array( $cat_id, $cat_id, $cat_id2 ), wp_list_pluck( $terms2, 'term_id' ) );61 $this->assertSame( array( $cat_id, $cat_id, $cat_id2 ), wp_list_pluck( $terms2, 'term_id' ) ); 62 62 } 63 63 … … 150 150 ); 151 151 152 $this->assert Equals( array( $t1, $t3, $t2 ), $found );152 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 153 153 } 154 154 … … 188 188 ); 189 189 190 $this->assert Equals( array( $t2, $t1, $t3 ), $found );190 $this->assertSame( array( $t2, $t1, $t3 ), $found ); 191 191 } 192 192 … … 224 224 ); 225 225 226 $this->assert Equals( array( $t1, $t3, $t2 ), $found );226 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 227 227 } 228 228 … … 263 263 ); 264 264 265 $this->assert Equals( array( $t1, $t3, $t2 ), $found );265 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 266 266 } 267 267 … … 327 327 ); 328 328 329 $this->assert Equals( array( $t1, $t3, $t2 ), $found );329 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 330 330 } 331 331 … … 372 372 ); 373 373 374 $this->assert Equals( array( $t1, $t3, $t2 ), $found );374 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 375 375 } 376 376 … … 413 413 ); 414 414 415 $this->assert Equals( array( $t1, $t3, $t2 ), $found );415 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 416 416 } 417 417 … … 459 459 ); 460 460 461 $this->assert Equals( array( $t1, $t3, $t2 ), $found );461 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 462 462 } 463 463 … … 496 496 ); 497 497 498 $this->assert Equals( array( $t2, $t3, $t1 ), $found );498 $this->assertSame( array( $t2, $t3, $t1 ), $found ); 499 499 } 500 500 … … 547 547 ); 548 548 549 $this->assert Equals( array( $t3 ), $found );549 $this->assertSame( array( $t3 ), $found ); 550 550 } 551 551 … … 928 928 $found = wp_get_object_terms( $p, $this->taxonomy, 'orderby=name&fields=ids' ); 929 929 930 $this->assert Equals( array( $t1, $t3, $t2 ), $found );930 $this->assertSame( array( $t1, $t3, $t2 ), $found ); 931 931 } 932 932 … … 947 947 // Test directly. 948 948 $get_object_terms = wp_get_object_terms( $post_id, $taxonomy, array( 'fields' => 'names' ) ); 949 $this->assert Equals( $terms, $get_object_terms );949 $this->assertSame( $terms, $get_object_terms ); 950 950 951 951 // Test metabox taxonomy (admin advanced edit). 952 952 $terms_to_edit = get_terms_to_edit( $post_id, $taxonomy ); 953 $this->assert Equals( implode( ',', $terms ), $terms_to_edit );953 $this->assertSame( implode( ',', $terms ), $terms_to_edit ); 954 954 } 955 955
Note: See TracChangeset
for help on using the changeset viewer.