- Timestamp:
- 12/12/2025 09:36:52 PM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestAbilitiesV1RunController.php
r61130 r61373 473 473 474 474 $this->assertEquals( 200, $response->get_status() ); 475 $this->assert Equals( 'User successfully deleted!', $response->get_data() );475 $this->assertSame( 'User successfully deleted!', $response->get_data() ); 476 476 } 477 477 … … 631 631 $response = $this->server->dispatch( $request ); 632 632 $this->assertEquals( 200, $response->get_status() ); 633 $this->assert Equals( 'Success: test data', $response->get_data() );633 $this->assertSame( 'Success: test data', $response->get_data() ); 634 634 } 635 635 … … 647 647 $this->assertEquals( 404, $response->get_status() ); 648 648 $data = $response->get_data(); 649 $this->assert Equals( 'rest_ability_not_found', $data['code'] );650 $this->assert Equals( 'Ability not found.', $data['message'] );649 $this->assertSame( 'rest_ability_not_found', $data['code'] ); 650 $this->assertSame( 'Ability not found.', $data['message'] ); 651 651 } 652 652 … … 680 680 $this->assertEquals( 500, $response->get_status() ); 681 681 $data = $response->get_data(); 682 $this->assert Equals( 'test_error', $data['code'] );683 $this->assert Equals( 'This is a test error', $data['message'] );682 $this->assertSame( 'test_error', $data['code'] ); 683 $this->assertSame( 'This is a test error', $data['message'] ); 684 684 } 685 685 … … 699 699 $this->assertEquals( 404, $response->get_status() ); 700 700 $data = $response->get_data(); 701 $this->assert Equals( 'rest_ability_not_found', $data['code'] );701 $this->assertSame( 'rest_ability_not_found', $data['code'] ); 702 702 } 703 703 … … 715 715 $schema = $data['schema']; 716 716 717 $this->assert Equals( 'ability-execution', $schema['title'] );718 $this->assert Equals( 'object', $schema['type'] );717 $this->assertSame( 'ability-execution', $schema['title'] ); 718 $this->assertSame( 'object', $schema['type'] ); 719 719 $this->assertArrayHasKey( 'properties', $schema ); 720 720 $this->assertArrayHasKey( 'result', $schema['properties'] ); … … 762 762 763 763 $data = $response->get_data(); 764 $this->assert Equals( 'nested', $data['level1']['level2']['value'] );764 $this->assertSame( 'nested', $data['level1']['level2']['value'] ); 765 765 $this->assertEquals( array( 1, 2, 3 ), $data['array'] ); 766 766 }
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)