- Timestamp:
- 12/12/2025 09:36:52 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestAbilitiesV1CategoriesController.php
r61130 r61373 172 172 173 173 $data = $response->get_data(); 174 $this->assert Equals( 'test-data-retrieval', $data['slug'] );175 $this->assert Equals( 'Data Retrieval', $data['label'] );176 $this->assert Equals( 'Abilities that retrieve and return data from the WordPress site.', $data['description'] );174 $this->assertSame( 'test-data-retrieval', $data['slug'] ); 175 $this->assertSame( 'Data Retrieval', $data['label'] ); 176 $this->assertSame( 'Abilities that retrieve and return data from the WordPress site.', $data['description'] ); 177 177 $this->assertArrayHasKey( 'meta', $data ); 178 178 } … … 190 190 191 191 $data = $response->get_data(); 192 $this->assert Equals( 'test-communication', $data['slug'] );192 $this->assertSame( 'test-communication', $data['slug'] ); 193 193 $this->assertArrayHasKey( 'meta', $data ); 194 194 $this->assertIsArray( $data['meta'] ); 195 $this->assert Equals( 'high', $data['meta']['priority'] );195 $this->assertSame( 'high', $data['meta']['priority'] ); 196 196 } 197 197 … … 213 213 $data = $response->get_data(); 214 214 $this->assertCount( 2, $data, 'Response should only contain the requested fields.' ); 215 $this->assert Equals( 'test-data-retrieval', $data['slug'] );216 $this->assert Equals( 'Data Retrieval', $data['label'] );215 $this->assertSame( 'test-data-retrieval', $data['slug'] ); 216 $this->assertSame( 'Data Retrieval', $data['label'] ); 217 217 } 218 218 … … 231 231 232 232 $data = $response->get_data(); 233 $this->assert Equals( 'rest_ability_category_not_found', $data['code'] );233 $this->assertSame( 'rest_ability_category_not_found', $data['code'] ); 234 234 } 235 235 … … 425 425 $schema = $data['schema']; 426 426 427 $this->assert Equals( 'ability-category', $schema['title'] );428 $this->assert Equals( 'object', $schema['type'] );427 $this->assertSame( 'ability-category', $schema['title'] ); 428 $this->assertSame( 'object', $schema['type'] ); 429 429 $this->assertArrayHasKey( 'properties', $schema ); 430 430 … … 439 439 440 440 $slug_property = $properties['slug']; 441 $this->assert Equals( 'string', $slug_property['type'] );441 $this->assertSame( 'string', $slug_property['type'] ); 442 442 $this->assertTrue( $slug_property['readonly'] ); 443 443 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)