Changeset 41176
- Timestamp:
- 07/27/2017 07:03:45 PM (7 years ago)
- Location:
- trunk/tests/phpunit/tests/rest-api
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-post-meta-fields.php
r40061 r41176 394 394 remove_filter( 'query', array( $this, 'error_insert_query' ) ); 395 395 $wpdb->show_errors = true; 396 397 $this->assertErrorResponse( 'rest_meta_database_error', $response, 500 ); 396 398 } 397 399 -
trunk/tests/phpunit/tests/rest-api/rest-post-statuses-controller.php
r38832 r41176 102 102 public function test_create_item() { 103 103 /** Post statuses can't be created **/ 104 $request = new WP_REST_Request( 'POST', '/wp/v2/statuses' ); 105 $response = $this->server->dispatch( $request ); 106 $this->assertEquals( 404, $response->get_status() ); 104 107 } 105 108 106 109 public function test_update_item() { 107 110 /** Post statuses can't be updated **/ 111 $request = new WP_REST_Request( 'POST', '/wp/v2/statuses/draft' ); 112 $response = $this->server->dispatch( $request ); 113 $this->assertEquals( 404, $response->get_status() ); 108 114 } 109 115 110 116 public function test_delete_item() { 111 117 /** Post statuses can't be deleted **/ 118 $request = new WP_REST_Request( 'DELETE', '/wp/v2/statuses/draft' ); 119 $response = $this->server->dispatch( $request ); 120 $this->assertEquals( 404, $response->get_status() ); 112 121 } 113 122 -
trunk/tests/phpunit/tests/rest-api/rest-post-types-controller.php
r39647 r41176 96 96 public function test_create_item() { 97 97 /** Post types can't be created **/ 98 $request = new WP_REST_Request( 'POST', '/wp/v2/types' ); 99 $response = $this->server->dispatch( $request ); 100 $this->assertEquals( 404, $response->get_status() ); 98 101 } 99 102 100 103 public function test_update_item() { 101 104 /** Post types can't be updated **/ 105 $request = new WP_REST_Request( 'POST', '/wp/v2/types/post' ); 106 $response = $this->server->dispatch( $request ); 107 $this->assertEquals( 404, $response->get_status() ); 102 108 } 103 109 104 110 public function test_delete_item() { 105 111 /** Post types can't be deleted **/ 112 $request = new WP_REST_Request( 'DELETE', '/wp/v2/types/post' ); 113 $response = $this->server->dispatch( $request ); 114 $this->assertEquals( 404, $response->get_status() ); 106 115 } 107 116 -
trunk/tests/phpunit/tests/rest-api/rest-taxonomies-controller.php
r39191 r41176 112 112 public function test_create_item() { 113 113 /** Taxonomies can't be created **/ 114 $request = new WP_REST_Request( 'POST', '/wp/v2/taxonomies' ); 115 $response = $this->server->dispatch( $request ); 116 $this->assertEquals( 404, $response->get_status() ); 114 117 } 115 118 116 119 public function test_update_item() { 117 120 /** Taxonomies can't be updated **/ 121 $request = new WP_REST_Request( 'POST', '/wp/v2/taxonomies/category' ); 122 $response = $this->server->dispatch( $request ); 123 $this->assertEquals( 404, $response->get_status() ); 118 124 } 119 125 120 126 public function test_delete_item() { 121 127 /** Taxonomies can't be deleted **/ 128 $request = new WP_REST_Request( 'DELETE', '/wp/v2/taxonomies/category' ); 129 $response = $this->server->dispatch( $request ); 130 $this->assertEquals( 404, $response->get_status() ); 122 131 } 123 132
Note: See TracChangeset
for help on using the changeset viewer.