Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Adapt unit test assertions
  • Loading branch information
SantosGuillamot committed Sep 16, 2024
commit fcb7b6321dcc4e5c9748df005ad4469c976df8c4
8 changes: 4 additions & 4 deletions tests/phpunit/tests/rest-api/rest-post-meta-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -3103,8 +3103,8 @@ public function test_default_is_added_to_schema() {
$response = rest_do_request( $request );

$schema = $response->get_data()['schema']['properties']['meta']['properties']['with_default'];
$this->assertArrayHasKey( 'default', $schema );
$this->assertSame( 'Goodnight Moon', $schema['default'] );
$this->assertArrayHasKey( 'default', $schema, 'Schema is expected to have the default property' );
$this->assertSame( 'Goodnight Moon', $schema['default'], 'Schema default is expected to be defined and contain the value of the meta default argument.' );
}

/**
Expand All @@ -3116,8 +3116,8 @@ public function test_title_is_added_to_schema() {

$schema = $response->get_data()['schema']['properties']['meta']['properties']['with_label'];

$this->assertArrayHasKey( 'default', $schema );
$this->assertSame( 'Meta Label', $schema['title'] );
$this->assertArrayHasKey( 'title', $schema, 'Schema is expected to have the title property' );
$this->assertSame( 'Meta Label', $schema['title'], 'Schema title is expected to be defined and contain the value of the meta label argument.' );
}

/**
Expand Down