- 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-categories-controller.php
r48937 r48939 119 119 $data = $response->get_data(); 120 120 $this->assertSame( 'view', $data['endpoints'][0]['args']['context']['default'] ); 121 $this->assert EqualSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] );121 $this->assertSameSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] ); 122 122 // Single. 123 123 $category1 = $this->factory->category->create( array( 'name' => 'Season 5' ) ); … … 126 126 $data = $response->get_data(); 127 127 $this->assertSame( 'view', $data['endpoints'][0]['args']['context']['default'] ); 128 $this->assert EqualSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] );128 $this->assertSameSets( array( 'view', 'embed', 'edit' ), $data['endpoints'][0]['args']['context']['enum'] ); 129 129 } 130 130 … … 1230 1230 } 1231 1231 1232 $this->assert EqualSets( $relations, array_keys( $links ) );1232 $this->assertSameSets( $relations, array_keys( $links ) ); 1233 1233 $this->assertContains( 'wp/v2/taxonomies/' . $term->taxonomy, $links['about'][0]['href'] ); 1234 1234 $this->assertSame( add_query_arg( 'categories', $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.