- Timestamp:
- 12/12/2025 09:36:52 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestAbilitiesV1ListController.php
r61130 r61373 308 308 $data = $response->get_data(); 309 309 $this->assertCount( 7, $data, 'Response should contain all fields.' ); 310 $this->assert Equals( 'test/calculator', $data['name'] );311 $this->assert Equals( 'Calculator', $data['label'] );312 $this->assert Equals( 'Performs basic calculations', $data['description'] );313 $this->assert Equals( 'math', $data['category'] );310 $this->assertSame( 'test/calculator', $data['name'] ); 311 $this->assertSame( 'Calculator', $data['label'] ); 312 $this->assertSame( 'Performs basic calculations', $data['description'] ); 313 $this->assertSame( 'math', $data['category'] ); 314 314 $this->assertArrayHasKey( 'input_schema', $data ); 315 315 $this->assertArrayHasKey( 'output_schema', $data ); … … 335 335 $data = $response->get_data(); 336 336 $this->assertCount( 2, $data, 'Response should only contain the requested fields.' ); 337 $this->assert Equals( 'test/calculator', $data['name'] );338 $this->assert Equals( 'Calculator', $data['label'] );337 $this->assertSame( 'test/calculator', $data['name'] ); 338 $this->assertSame( 'Calculator', $data['label'] ); 339 339 } 340 340 … … 356 356 $data = $response->get_data(); 357 357 $this->assertCount( 3, $data, 'Response should only contain the fields for embed context.' ); 358 $this->assert Equals( 'test/calculator', $data['name'] );359 $this->assert Equals( 'Calculator', $data['label'] );360 $this->assert Equals( 'math', $data['category'] );358 $this->assertSame( 'test/calculator', $data['name'] ); 359 $this->assertSame( 'Calculator', $data['label'] ); 360 $this->assertSame( 'math', $data['category'] ); 361 361 } 362 362 … … 375 375 376 376 $data = $response->get_data(); 377 $this->assert Equals( 'rest_ability_not_found', $data['code'] );377 $this->assertSame( 'rest_ability_not_found', $data['code'] ); 378 378 } 379 379 … … 390 390 391 391 $data = $response->get_data(); 392 $this->assert Equals( 'rest_ability_not_found', $data['code'] );392 $this->assertSame( 'rest_ability_not_found', $data['code'] ); 393 393 } 394 394 … … 582 582 $schema = $data['schema']; 583 583 584 $this->assert Equals( 'ability', $schema['title'] );585 $this->assert Equals( 'object', $schema['type'] );584 $this->assertSame( 'ability', $schema['title'] ); 585 $this->assertSame( 'object', $schema['type'] ); 586 586 $this->assertArrayHasKey( 'properties', $schema ); 587 587 … … 746 746 // Should only have math category abilities 747 747 foreach ( $data as $ability ) { 748 $this->assert Equals( 'math', $ability['category'], 'All abilities should be in math category' );748 $this->assertSame( 'math', $ability['category'], 'All abilities should be in math category' ); 749 749 } 750 750
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)