- Timestamp:
- 11/03/2016 08:04:59 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-comments-controller.php
r39105 r39126 1889 1889 'user_id' => self::$subscriber_id, 1890 1890 )); 1891 1891 1892 $request = new WP_REST_Request( 'DELETE', sprintf( '/wp/v2/comments/%d', $comment_id ) ); 1892 1893 $response = $this->server->dispatch( $request ); 1894 $this->assertEquals( 200, $response->get_status() ); 1895 $data = $response->get_data(); 1896 $this->assertEquals( self::$post_id, $data['post'] ); 1893 $request->set_param( 'force', 'false' ); 1894 $response = $this->server->dispatch( $request ); 1895 $this->assertEquals( 200, $response->get_status() ); 1896 1897 $data = $response->get_data(); 1898 $this->assertEquals( 'trash', $data['status'] ); 1897 1899 } 1898 1900 … … 1911 1913 $this->assertEquals( 200, $response->get_status() ); 1912 1914 $data = $response->get_data(); 1913 $this->assertEquals( self::$post_id, $data['post'] ); 1915 $this->assertTrue( $data['deleted'] ); 1916 $this->assertNotEmpty( $data['previous']['post'] ); 1914 1917 } 1915 1918
Note: See TracChangeset
for help on using the changeset viewer.