Tests: Use assertSame() in block_has_support() tests.

This ensures that not only the return values match the expected results, but also that their type is the same.

Going forward, stricter type checking by using `assertSame()` should generally be preferred to `assertEquals()` where appropriate, to make the tests more reliable.

Follow-up to [56382].

See #60706.

git-svn-id: https://develop.svn.wordpress.org/trunk@58160 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2024-05-16 15:13:43 +00:00
parent 13d5244c43
commit 23a455efdb

View File

@ -697,7 +697,7 @@ class Tests_Blocks_wpBlock extends WP_UnitTestCase {
$this->registry->register( 'core/example', $block_data );
$block_type = $this->registry->get_registered( 'core/example' );
$has_support = block_has_support( $block_type, $support );
$this->assertEquals( $expected, $has_support, $message );
$this->assertSame( $expected, $has_support, $message );
}
/**