- Timestamp:
- 09/04/2020 07:01:00 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php
r48937 r48939 137 137 $data = $response->get_data(); 138 138 $this->assertSame( 'view', $data['endpoints'][0]['args']['context']['default'] ); 139 $this->assert EqualSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] );139 $this->assertSameSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] ); 140 140 // Single. 141 141 $tag1 = $this->factory->tag->create( array( 'name' => 'Season 5' ) ); … … 144 144 $data = $response->get_data(); 145 145 $this->assertSame( 'view', $data['endpoints'][0]['args']['context']['default'] ); 146 $this->assert EqualSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] );146 $this->assertSameSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] ); 147 147 } 148 148 … … 1343 1343 $found_2 = wp_list_pluck( $response->data, 'id' ); 1344 1344 1345 $this->assert EqualSets( $found_1, $found_2 );1345 $this->assertSameSets( $found_1, $found_2 ); 1346 1346 $this->assertSame( $num_queries, $wpdb->num_queries ); 1347 1347 } … … 1445 1445 $expected_links[] = 'up'; 1446 1446 } 1447 $this->assert EqualSets( $expected_links, array_keys( $links ) );1447 $this->assertSameSets( $expected_links, array_keys( $links ) ); 1448 1448 $this->assertContains( 'wp/v2/taxonomies/' . $term->taxonomy, $links['about'][0]['href'] ); 1449 1449 $this->assertSame( add_query_arg( 'tags', $term->term_id, rest_url( 'wp/v2/posts' ) ), $links['https://api.w.org/post_type'][0]['href'] );
Note: See TracChangeset
for help on using the changeset viewer.