Skip to content

Commit

Permalink
Added resolver tests for blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Jun 14, 2024
1 parent c1c411f commit dc18794
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions phpunit/class-wp-theme-json-resolver-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,22 @@ public function test_resolve_theme_file_uris() {
'url' => 'file:./example/img/image.png',
),
),
'blocks' => array(

Check failure on line 1207 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed

Check warning on line 1207 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Array double arrow not aligned correctly; expected 5 space(s) between "'blocks'" and double arrow, but found 1.
'core/quote' => array(

Check failure on line 1208 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
'background' => array(

Check failure on line 1209 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
'backgroundImage' => array(

Check failure on line 1210 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
'url' => 'file:./example/img/quote.png',

Check failure on line 1211 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
),

Check failure on line 1212 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
),

Check failure on line 1213 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
),

Check failure on line 1214 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
'core/verse' => array(

Check failure on line 1215 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
'background' => array(

Check failure on line 1216 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Tabs must be used to indent lines; spaces are not allowed
'backgroundImage' => array(
'url' => 'file:./example/img/verse.png',
),
),
),
),
),
)
);
Expand All @@ -1216,6 +1232,22 @@ public function test_resolve_theme_file_uris() {
'url' => 'https://example.org/wp-content/themes/example-theme/example/img/image.png',
),
),
'blocks' => array(

Check warning on line 1235 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Array double arrow not aligned correctly; expected 5 space(s) between "'blocks'" and double arrow, but found 1.
'core/quote' => array(
'background' => array(
'backgroundImage' => array(
'url' => 'https://example.org/wp-content/themes/example-theme/example/img/quote.png',
),
),
),
'core/verse' => array(
'background' => array(
'backgroundImage' => array(
'url' => 'https://example.org/wp-content/themes/example-theme/example/img/verse.png',
),
),
),
),
),
);

Expand Down Expand Up @@ -1249,6 +1281,22 @@ public function test_get_resolved_theme_uris() {
'url' => 'file:./example/img/image.png',
),
),
'blocks' => array(

Check warning on line 1284 in phpunit/class-wp-theme-json-resolver-test.php

View workflow job for this annotation

GitHub Actions / PHP coding standards

Array double arrow not aligned correctly; expected 5 space(s) between "'blocks'" and double arrow, but found 1.
'core/quote' => array(
'background' => array(
'backgroundImage' => array(
'url' => 'file:./example/img/quote.jpg',
),
),
),
'core/verse' => array(
'background' => array(
'backgroundImage' => array(
'url' => 'file:./example/img/verse.gif',
),
),
),
),
),
)
);
Expand All @@ -1260,6 +1308,18 @@ public function test_get_resolved_theme_uris() {
'target' => 'styles.background.backgroundImage.url',
'type' => 'image/png',
),
array(
'name' => 'file:./example/img/quote.jpg',
'href' => 'https://example.org/wp-content/themes/example-theme/example/img/quote.jpg',
'target' => 'styles.blocks.core/quote.background.backgroundImage.url',
'type' => 'image/jpeg',
),
array(
'name' => 'file:./example/img/verse.gif',
'href' => 'https://example.org/wp-content/themes/example-theme/example/img/verse.gif',
'target' => 'styles.blocks.core/verse.background.backgroundImage.url',
'type' => 'image/gif',
),
);

/*
Expand Down

0 comments on commit dc18794

Please sign in to comment.