Skip to content

Commit f4694aa

Browse files
committed
Add yet more debug code
1 parent 1f8a2f8 commit f4694aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/phpunit/tests/template.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1716,9 +1716,9 @@ static function () {
17161716
wp_should_load_separate_core_block_assets()
17171717
);
17181718
$this->ensure_style_asset_file_created( 'wp-block-library-theme', 'css/dist/block-library/theme.css', true );
1719-
$dependency = wp_styles()->query( 'wp-block-library' );
1720-
$this->assertTrue( (bool) $dependency, 'Expected wp-block-library stylesheet to be registered.' );
1721-
$this->assertIsString( $dependency->src, 'Expected wp-block-library to have a string src. Dependency: ' . json_encode( $dependency ) );
1719+
$block_library_dependency = wp_styles()->query( 'wp-block-library' );
1720+
$this->assertTrue( (bool) $block_library_dependency, 'Expected wp-block-library stylesheet to be registered.' );
1721+
$this->assertIsString( $block_library_dependency->src, 'Expected wp-block-library to have a string src. Dependency: ' . json_encode( $block_library_dependency ) );
17221722

17231723
if ( wp_should_load_separate_core_block_assets() ) {
17241724
$this->ensure_style_asset_file_created( 'wp-block-separator', 'blocks/separator/style.css', true );
@@ -1813,7 +1813,7 @@ static function () {
18131813
$this->assertSame(
18141814
$expected_styles,
18151815
$found_subset_styles,
1816-
'Expected the same styles. Snapshot: ' . self::get_array_snapshot_export( $found_subset_styles )
1816+
'Expected the same styles. Snapshot: ' . self::get_array_snapshot_export( $found_subset_styles ) . "\nAnd wp-block-library: " . json_encode( $block_library_dependency, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES ) . "\n And file contents: " . file_get_contents( $block_library_dependency->extra['path'] )
18171817
);
18181818
}
18191819

0 commit comments

Comments
 (0)