- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-block-directory-controller.php
r48656 r48937 61 61 $response = rest_get_server()->dispatch( $request ); 62 62 $data = $response->get_data(); 63 $this->assert Equals( 'view', $data['endpoints'][0]['args']['context']['default'] );64 $this->assert Equals( array( 'view' ), $data['endpoints'][0]['args']['context']['enum'] );63 $this->assertSame( 'view', $data['endpoints'][0]['args']['context']['default'] ); 64 $this->assertSame( array( 'view' ), $data['endpoints'][0]['args']['context']['enum'] ); 65 65 } 66 66 … … 76 76 $result = rest_do_request( $request ); 77 77 $this->assertNotWPError( $result->as_error() ); 78 $this->assert Equals( 200, $result->status );78 $this->assertSame( 200, $result->status ); 79 79 } 80 80 … … 117 117 118 118 // Should produce a 200 status with an empty array. 119 $this->assert Equals( 200, $response->status );120 $this->assert Equals( array(), $data );119 $this->assertSame( 200, $response->status ); 120 $this->assertSame( array(), $data ); 121 121 } 122 122 … … 167 167 ); 168 168 169 $this->assert Equals( $expected, $response->get_data() );169 $this->assertSame( $expected, $response->get_data() ); 170 170 } 171 171 … … 182 182 183 183 // Check endpoints 184 $this->assert Equals( array( 'GET' ), $data['endpoints'][0]['methods'] );184 $this->assertSame( array( 'GET' ), $data['endpoints'][0]['methods'] ); 185 185 $this->assertTrue( $data['endpoints'][0]['args']['term']['required'] ); 186 186
Note: See TracChangeset
for help on using the changeset viewer.