mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 21:08:44 +01:00
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:
parent
13d5244c43
commit
23a455efdb
@ -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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user