Changeset 48939 for trunk/tests/phpunit/tests/term/wpSetObjectTerms.php
- Timestamp:
- 09/04/2020 07:01:00 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/term/wpSetObjectTerms.php
r48937 r48939 185 185 $added1 = wp_set_object_terms( $p, array( $t1 ), 'wptests_tax' ); 186 186 $this->assertNotEmpty( $added1 ); 187 $this->assert EqualSets( array( $t1 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) );187 $this->assertSameSets( array( $t1 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) ); 188 188 189 189 $added2 = wp_set_object_terms( $p, array( $t2 ), 'wptests_tax', true ); 190 190 $this->assertNotEmpty( $added2 ); 191 $this->assert EqualSets( array( $t1, $t2 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) );191 $this->assertSameSets( array( $t1, $t2 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) ); 192 192 193 193 _unregister_taxonomy( 'wptests_tax' ); … … 210 210 $added1 = wp_set_object_terms( $p, array( $t1 ), 'wptests_tax' ); 211 211 $this->assertNotEmpty( $added1 ); 212 $this->assert EqualSets( array( $t1 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) );212 $this->assertSameSets( array( $t1 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) ); 213 213 214 214 $added2 = wp_set_object_terms( $p, array( $t2 ), 'wptests_tax', false ); 215 215 $this->assertNotEmpty( $added2 ); 216 $this->assert EqualSets( array( $t2 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) );216 $this->assertSameSets( array( $t2 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) ); 217 217 218 218 _unregister_taxonomy( 'wptests_tax' ); … … 235 235 $added1 = wp_set_object_terms( $p, array( $t1 ), 'wptests_tax' ); 236 236 $this->assertNotEmpty( $added1 ); 237 $this->assert EqualSets( array( $t1 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) );237 $this->assertSameSets( array( $t1 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) ); 238 238 239 239 $added2 = wp_set_object_terms( $p, array( $t2 ), 'wptests_tax' ); 240 240 $this->assertNotEmpty( $added2 ); 241 $this->assert EqualSets( array( $t2 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) );241 $this->assertSameSets( array( $t2 ), wp_get_object_terms( $p, 'wptests_tax', array( 'fields' => 'ids' ) ) ); 242 242 243 243 _unregister_taxonomy( 'wptests_tax' );
Note: See TracChangeset
for help on using the changeset viewer.