Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Aug 4, 2022
1 parent 6e155fd commit 0440e24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ public function test_generate_prettified_with_indent_css_declarations_string() {
$this->assertSame(
' color: red;
border-top-left-radius: 99px;
text-decoration: underline;',
text-decoration: underline;
',
$css_declarations->get_declarations_string( true, 1 )
);
}
Expand All @@ -139,7 +140,8 @@ public function test_generate_prettified_with_more_indents_css_declarations_stri
$this->assertSame(
' color: red;
border-top-left-radius: 99px;
text-decoration: underline;',
text-decoration: underline;
',
$css_declarations->get_declarations_string( true, 2 )
);
}
Expand All @@ -156,7 +158,7 @@ public function test_remove_unsafe_properties_and_values() {
$css_declarations = new WP_Style_Engine_CSS_Declarations( $input_declarations );

$this->assertSame(
'color:<red/>;margin-right:10em;',
'margin-right:10em;',
$css_declarations->get_declarations_string()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function test_add_rule() {
$new_pie_store = WP_Style_Engine_CSS_Rules_Store::get_store( 'meat-pie' );
$selector = '.wp-block-sauce a:hover';
$store_rule = $new_pie_store->add_rule( $selector );
$expected = "$selector{}";
$expected = '';
$this->assertEquals( $expected, $store_rule->get_css() );

$pie_declarations = array(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function data_get_styles_fixtures() {
),
'options' => null,
'expected_output' => array(
'css' => 'font-family:Roboto,Oxygen-Sans,Ubuntu,sans-serif;font-style:italic;font-weight:800;line-height:1.3;text-decoration:underline;text-transform:uppercase;letter-spacing:2;',
'css' => 'font-size:clamp(2em, 2vw, 4em);font-family:Roboto,Oxygen-Sans,Ubuntu,sans-serif;font-style:italic;font-weight:800;line-height:1.3;text-decoration:underline;text-transform:uppercase;letter-spacing:2;',
'declarations' => array(
'font-size' => 'clamp(2em, 2vw, 4em)',
'font-family' => 'Roboto,Oxygen-Sans,Ubuntu,sans-serif',
Expand Down

0 comments on commit 0440e24

Please sign in to comment.