Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests for changes in core logic #31982

Merged
merged 1 commit into from
May 19, 2021
Merged
Changes from all commits
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
14 changes: 7 additions & 7 deletions phpunit/class-wp-theme-json-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ function test_remove_insecure_properties_removes_unsafe_styles_sub_properties()
'padding' => array(
'top' => '1px',
'right' => '1px',
'bottom' => 'var(--unsafe-var-toplevel)',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, I noticed when you insert HTML here, it's not stripped.

'bottom' => 'var(--bottom, var(--unsafe-fallback))',
'left' => '1px',
),
),
Expand All @@ -586,7 +586,7 @@ function test_remove_insecure_properties_removes_unsafe_styles_sub_properties()
'padding' => array(
'top' => '2px',
'right' => '2px',
'bottom' => 'var(--unsafe-var-elements)',
'bottom' => 'var(--bottom, var(--unsafe-fallback))',
'left' => '2px',
),
),
Expand All @@ -598,7 +598,7 @@ function test_remove_insecure_properties_removes_unsafe_styles_sub_properties()
'padding' => array(
'top' => '3px',
'right' => '3px',
'bottom' => 'var(--unsafe-var-block)',
'bottom' => 'var(bottom, var(--unsafe-fallback))',
'left' => '3px',
),
),
Expand All @@ -608,7 +608,7 @@ function test_remove_insecure_properties_removes_unsafe_styles_sub_properties()
'padding' => array(
'top' => '4px',
'right' => '4px',
'bottom' => 'var(--unsafe-var-block-elements)',
'bottom' => 'var(--bottom, var(--unsafe-fallback))',
'left' => '4px',
),
),
Expand Down Expand Up @@ -801,7 +801,7 @@ function test_remove_insecure_properties_removes_unsafe_preset_settings() {
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => 'var(--custom-v1)',
'color' => 'var(--color, var(--unsafe-fallback))',
),
array(
'name' => 'Pink',
Expand Down Expand Up @@ -830,7 +830,7 @@ function test_remove_insecure_properties_removes_unsafe_preset_settings() {
array(
'name' => 'Helvetica Arial',
'slug' => 'helvetica-arial',
'fontFamily' => 'var(--custom-var-1)',
'fontFamily' => 'var(--fontFamily, var(--unsafe-fallback))',
),
),
),
Expand All @@ -851,7 +851,7 @@ function test_remove_insecure_properties_removes_unsafe_preset_settings() {
array(
'name' => 'Blue',
'slug' => 'blue',
'color' => 'var(--custom-v1)',
'color' => 'var(--color, var(--unsafe--falback))',
),
array(
'name' => 'Pink',
Expand Down