Skip to content

Commit 2a2f97e

Browse files
committed
Add $message to new tests.
1 parent 586a490 commit 2a2f97e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/phpunit/tests/blocks/register.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,8 +1039,8 @@ public function test_block_registers_with_metadata_fixture() {
10391039
'style' => 'file:./block.css',
10401040
'viewStyle' => 'file:./block-view.css',
10411041
);
1042-
$this->assertSame( 'tests-notice-style', register_block_style_handle( $metadata, 'style' ) );
1043-
$this->assertSame( 'tests-notice-view-style', register_block_style_handle( $metadata, 'viewStyle' ) );
1042+
$this->assertSame( 'tests-notice-style', register_block_style_handle( $metadata, 'style' ), 'Style handle is expected to be tests-notice-style' );
1043+
$this->assertSame( 'tests-notice-view-style', register_block_style_handle( $metadata, 'viewStyle' ), 'View style handle is expected to be tests-notice-view-style' );
10441044
$this->assertTrue( wp_style_is( 'tests-notice-style', 'registered' ), 'Expected "tests-notice-style" style to be registered.' );
10451045
$this->assertTrue( wp_style_is( 'tests-notice-view-style', 'registered' ), 'Expected "tests-notice-view-style" style to be registered.' );
10461046

tests/phpunit/tests/blocks/registerCoreBlockStyleHandles.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function tear_down() {
6464
*/
6565
public function test_wp_should_load_separate_core_block_assets_false( $name, $schema ) {
6666
add_filter( 'should_load_separate_core_block_assets', '__return_false' );
67-
$this->assertFalse( wp_should_load_separate_core_block_assets() );
67+
$this->assertFalse( wp_should_load_separate_core_block_assets(), 'Core blocks are not expected to load separate assets' );
6868
register_core_block_style_handles();
6969

7070
foreach ( self::STYLE_FIELDS as $style_field => $filename ) {
@@ -91,7 +91,7 @@ public function test_wp_should_load_separate_core_block_assets_false( $name, $sc
9191
*/
9292
public function test_wp_should_load_separate_core_block_assets_true( $name, $schema ) {
9393
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
94-
$this->assertTrue( wp_should_load_separate_core_block_assets() );
94+
$this->assertTrue( wp_should_load_separate_core_block_assets(), 'Core assets are expected to load separately' );
9595
register_core_block_style_handles();
9696

9797
$wp_styles = $GLOBALS['wp_styles'];

tests/phpunit/tests/theme/wpAddGlobalStylesForBlocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public function test_blocks_inline_styles_get_rendered() {
322322
public function test_third_party_blocks_inline_styles_for_elements_get_rendered_when_per_block() {
323323
$this->set_up_third_party_block();
324324
add_filter( 'should_load_separate_core_block_assets', '__return_true' );
325-
$this->assertTrue( wp_should_load_separate_core_block_assets() );
325+
$this->assertTrue( wp_should_load_separate_core_block_assets(), 'Core assets are expected to load separately' );
326326

327327
wp_register_style( 'global-styles', false, array(), true, true );
328328
wp_enqueue_style( 'global-styles' );

0 commit comments

Comments
 (0)