mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Block Hooks: Fix actual/expected order in test assertions.
In test assertions for the `set_ignored_hooked_blocks_metadata` function, the actual value was erroneously passed as the first argument, and the expected value as the second. This changeset rectifies this by swapping the arguments. Follow-up [57627]. See #60506. git-svn-id: https://develop.svn.wordpress.org/trunk@57666 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fb8745d440
commit
fb27575fa1
@ -44,7 +44,7 @@ class Tests_Blocks_SetIgnoredHookedBlocksMetadata extends WP_UnitTestCase {
|
||||
);
|
||||
|
||||
set_ignored_hooked_blocks_metadata( $anchor_block, 'after', $hooked_blocks, null );
|
||||
$this->assertSame( $anchor_block['attrs']['metadata']['ignoredHookedBlocks'], array( 'tests/hooked-block' ) );
|
||||
$this->assertSame( array( 'tests/hooked-block' ), $anchor_block['attrs']['metadata']['ignoredHookedBlocks'] );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -70,8 +70,8 @@ class Tests_Blocks_SetIgnoredHookedBlocksMetadata extends WP_UnitTestCase {
|
||||
|
||||
set_ignored_hooked_blocks_metadata( $anchor_block, 'after', $hooked_blocks, null );
|
||||
$this->assertSame(
|
||||
$anchor_block['attrs']['metadata']['ignoredHookedBlocks'],
|
||||
array( 'tests/other-ignored-block', 'tests/hooked-block' )
|
||||
array( 'tests/other-ignored-block', 'tests/hooked-block' ),
|
||||
$anchor_block['attrs']['metadata']['ignoredHookedBlocks']
|
||||
);
|
||||
}
|
||||
|
||||
@ -101,8 +101,8 @@ class Tests_Blocks_SetIgnoredHookedBlocksMetadata extends WP_UnitTestCase {
|
||||
remove_filter( 'hooked_block_types', $filter, 10 );
|
||||
|
||||
$this->assertSame(
|
||||
$anchor_block['attrs']['metadata']['ignoredHookedBlocks'],
|
||||
array( 'tests/hooked-block-added-by-filter' )
|
||||
array( 'tests/hooked-block-added-by-filter' ),
|
||||
$anchor_block['attrs']['metadata']['ignoredHookedBlocks']
|
||||
);
|
||||
}
|
||||
|
||||
@ -140,8 +140,8 @@ class Tests_Blocks_SetIgnoredHookedBlocksMetadata extends WP_UnitTestCase {
|
||||
remove_filter( 'hooked_block_types', $filter, 10 );
|
||||
|
||||
$this->assertSame(
|
||||
$anchor_block['attrs']['metadata']['ignoredHookedBlocks'],
|
||||
array( 'tests/hooked-block-added-by-filter' )
|
||||
array( 'tests/hooked-block-added-by-filter' ),
|
||||
$anchor_block['attrs']['metadata']['ignoredHookedBlocks']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user