Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix lint error
  • Loading branch information
t-hamano committed Dec 24, 2025
commit 17a3b1d6bece9734032c9dc29156251ad7d0cd61
20 changes: 10 additions & 10 deletions phpunit/block-supports/anchor-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function test_gutenberg_apply_anchor_support( $support, $value, $expected
*/
public function data_anchor_block_support() {
return array(
'anchor id attribute is applied' => array(
'anchor id attribute is applied' => array(
'support' => true,
'value' => 'my-anchor',
'expected' => array( 'id' => 'my-anchor' ),
Expand All @@ -80,12 +80,12 @@ public function data_anchor_block_support() {
'value' => 'my-anchor',
'expected' => array(),
),
'empty anchor value returns empty array' => array(
'empty anchor value returns empty array' => array(
'support' => true,
'value' => '',
'expected' => array(),
),
'null anchor value returns empty array' => array(
'null anchor value returns empty array' => array(
'support' => true,
'value' => null,
'expected' => array(),
Expand All @@ -95,37 +95,37 @@ public function data_anchor_block_support() {
'value' => ' ',
'expected' => array( 'id' => ' ' ),
),
'anchor with hyphen and numbers' => array(
'anchor with hyphen and numbers' => array(
'support' => true,
'value' => 'section-123',
'expected' => array( 'id' => 'section-123' ),
),
'anchor with underscore' => array(
'anchor with underscore' => array(
'support' => true,
'value' => 'my_anchor_id',
'expected' => array( 'id' => 'my_anchor_id' ),
),
'anchor with colon (valid in HTML5)' => array(
'anchor with colon (valid in HTML5)' => array(
'support' => true,
'value' => 'my:anchor',
'expected' => array( 'id' => 'my:anchor' ),
),
'anchor with period (valid in HTML5)' => array(
'anchor with period (valid in HTML5)' => array(
'support' => true,
'value' => 'my.anchor',
'expected' => array( 'id' => 'my.anchor' ),
),
'numeric anchor value' => array(
'numeric anchor value' => array(
'support' => true,
'value' => '123',
'expected' => array( 'id' => '123' ),
),
'zero string anchor value is applied' => array(
'zero string anchor value is applied' => array(
'support' => true,
'value' => '0',
'expected' => array( 'id' => '0' ),
),
'false value is treated as empty' => array(
'false value is treated as empty' => array(
'support' => true,
'value' => false,
'expected' => array(),
Expand Down
Loading