- Timestamp:
- 11/03/2016 02:17:39 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-categories-controller.php
r38975 r39105 429 429 } 430 430 431 public function test_get_terms_invalid_parent_arg() { 432 $category1 = $this->factory->category->create( array( 'name' => 'Parent' ) ); 433 $this->factory->category->create( array( 'name' => 'Child', 'parent' => $category1 ) ); 434 $request = new WP_REST_Request( 'GET', '/wp/v2/categories' ); 435 $request->set_param( 'parent', 'invalid-parent' ); 436 $response = $this->server->dispatch( $request ); 437 $this->assertErrorResponse( 'rest_invalid_param', $response, 400 ); 438 } 439 431 440 public function test_get_terms_private_taxonomy() { 432 441 register_taxonomy( 'robin', 'post', array( 'public' => false ) );
Note: See TracChangeset
for help on using the changeset viewer.