- 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-search-controller.php
r48937 r48939 112 112 113 113 $this->assertSame( 200, $response->get_status() ); 114 $this->assert EqualSets(114 $this->assertSameSets( 115 115 array_merge( 116 116 self::$my_title_post_ids, … … 148 148 149 149 $this->assertSame( 200, $response->get_status() ); 150 $this->assert EqualSets(150 $this->assertSameSets( 151 151 array_merge( 152 152 self::$my_title_post_ids, … … 171 171 172 172 $this->assertSame( 200, $response->get_status() ); 173 $this->assert EqualSets(173 $this->assertSameSets( 174 174 array_merge( 175 175 self::$my_title_post_ids, … … 193 193 194 194 $this->assertSame( 200, $response->get_status() ); 195 $this->assert EqualSets(195 $this->assertSameSets( 196 196 self::$my_title_page_ids, 197 197 wp_list_pluck( $response->get_data(), 'id' ) … … 241 241 242 242 $this->assertSame( 200, $response->get_status() ); 243 $this->assert EqualSets(243 $this->assertSameSets( 244 244 array_merge( 245 245 self::$my_title_post_ids, … … 263 263 264 264 $this->assertSame( 200, $response->get_status() ); 265 $this->assert EqualSets(265 $this->assertSameSets( 266 266 array_merge( 267 267 self::$my_title_post_ids, … … 284 284 285 285 $this->assertSame( 200, $response->get_status() ); 286 $this->assert EqualSets(286 $this->assertSameSets( 287 287 self::$my_content_post_ids, 288 288 wp_list_pluck( $response->get_data(), 'id' ) … … 421 421 ); 422 422 $response = $controller->get_items( $request ); 423 $this->assert EqualSets( range( 1, 10 ), wp_list_pluck( $response->get_data(), 'id' ) );423 $this->assertSameSets( range( 1, 10 ), wp_list_pluck( $response->get_data(), 'id' ) ); 424 424 425 425 $request = $this->get_request( … … 432 432 ); 433 433 $response = $controller->get_items( $request ); 434 $this->assert EqualSets( range( 1, 5 ), wp_list_pluck( $response->get_data(), 'id' ) );434 $this->assertSameSets( range( 1, 5 ), wp_list_pluck( $response->get_data(), 'id' ) ); 435 435 } 436 436 … … 497 497 $params = $controller->get_collection_params(); 498 498 $this->assertSame( 'test', $params[ WP_REST_Search_Controller::PROP_TYPE ]['default'] ); 499 $this->assert EqualSets( array( 'test' ), $params[ WP_REST_Search_Controller::PROP_TYPE ]['enum'] );500 $this->assert EqualSets( array( 'test_first_type', 'test_second_type', WP_REST_Search_Controller::TYPE_ANY ), $params[ WP_REST_Search_Controller::PROP_SUBTYPE ]['items']['enum'] );499 $this->assertSameSets( array( 'test' ), $params[ WP_REST_Search_Controller::PROP_TYPE ]['enum'] ); 500 $this->assertSameSets( array( 'test_first_type', 'test_second_type', WP_REST_Search_Controller::TYPE_ANY ), $params[ WP_REST_Search_Controller::PROP_SUBTYPE ]['items']['enum'] ); 501 501 } 502 502
Note: See TracChangeset
for help on using the changeset viewer.