Skip to content

Commit 3b03681

Browse files
authored
Apply suggestions from code review
Co-authored-by: Ramon <[email protected]>
1 parent 9cd439d commit 3b03681

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

tests/phpunit/tests/block-supports/wpStripCustomCssFromBlocks.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public function test_strips_css_from_blocks( $content, $message ) {
2222
$blocks = parse_blocks( $result );
2323

2424
$this->assertArrayNotHasKey( 'css', $blocks[0]['attrs']['style'] ?? array(), $message );
25+
$this->assertArrayNotHasKey( 'style', $blocks[0]['attrs'] ?? array(), 'style key should be fully removed when css was the only property.' );
2526
}
2627

2728
/**
@@ -35,10 +36,6 @@ public function data_strips_css_from_blocks() {
3536
'content' => '<!-- wp:paragraph {"style":{"css":"color: red;"}} --><p>Hello</p><!-- /wp:paragraph -->',
3637
'message' => 'style.css should be stripped from block attributes.',
3738
),
38-
'empty style object is cleaned up' => array(
39-
'content' => '<!-- wp:paragraph {"style":{"css":"color: red;"}} --><p>Hello</p><!-- /wp:paragraph -->',
40-
'message' => 'style.css should be stripped from block attributes.',
41-
),
4239
);
4340
}
4441

0 commit comments

Comments
 (0)