Skip to content

Commit 23a455e

Browse files
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
1 parent 13d5244 commit 23a455e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/phpunit/tests/blocks/wpBlock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ public function test_block_has_support_string( $block_data, $support, $expected,
697697
$this->registry->register( 'core/example', $block_data );
698698
$block_type = $this->registry->get_registered( 'core/example' );
699699
$has_support = block_has_support( $block_type, $support );
700-
$this->assertEquals( $expected, $has_support, $message );
700+
$this->assertSame( $expected, $has_support, $message );
701701
}
702702

703703
/**

0 commit comments

Comments
 (0)