Skip to content

Commit

Permalink
Fix some failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Oct 21, 2021
1 parent f6dcc4c commit 9df36c9
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tests/phpunit/tests/webfonts-api/wpWebfontsSchemaValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,28 @@ public function data_is_valid_schema_with_invalid() {
'font-style' => 'normal',
'font-weight' => '400',
),
'expected_message' => 'Webfont provider must be a non-empty string.',
'expected_message' => array(
'Webfont provider must be a non-empty string.',
),
'font-family: not defined' => array(
'provider: not registered' => array(
'webfont' => array(
'provider' => 'some-provider',
'font-style' => 'normal',
'font-weight' => '400',
),
'expected_message' => 'Webfont provider is not registered.',
),
'font-family: not defined' => array(
'webfont' => array(
'provider' => 'local',
'font-style' => 'normal',
'font-weight' => '400',
),
'expected_message' => 'Webfont font family must be a non-empty string.',
),
'font-family: empty string' => array(
'webfont' => array(
'provider' => 'some-provider',
'provider' => 'local',
'font-family' => '',
'font-style' => 'normal',
'font-weight' => '400',
Expand All @@ -140,7 +149,7 @@ public function data_is_valid_schema_with_invalid() {
),
'font-family: not a string' => array(
'webfont' => array(
'provider' => 'some-provider',
'provider' => 'local',
'font-family' => null,
'font-style' => 'normal',
'font-weight' => '400',
Expand Down

0 comments on commit 9df36c9

Please sign in to comment.