Make WordPress Core

Changeset 57666

Timestamp:
02/20/2024 01:23:08 PM (5 months ago)
Author:
Bernhard Reiter
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/blocks/setIgnoredHookedBlocksMetadata.php

    r57627 r57666  
    4545
    4646        set_ignored_hooked_blocks_metadata( $anchor_block, 'after', $hooked_blocks, null );
    47         $this->assertSame( $anchor_block['attrs']['metadata']['ignoredHookedBlocks'], array( 'tests/hooked-block' ) );
     47        $this->assertSame( );
    4848    }
    4949
     
    7171        set_ignored_hooked_blocks_metadata( $anchor_block, 'after', $hooked_blocks, null );
    7272        $this->assertSame(
    73             $anchor_block['attrs']['metadata']['ignoredHookedBlocks'],
    74             array( 'tests/other-ignored-block', 'tests/hooked-block' )
     73            ,
     74           
    7575        );
    7676    }
     
    102102
    103103        $this->assertSame(
    104             $anchor_block['attrs']['metadata']['ignoredHookedBlocks'],
    105             array( 'tests/hooked-block-added-by-filter' )
     104            ,
     105           
    106106        );
    107107    }
     
    141141
    142142        $this->assertSame(
    143             $anchor_block['attrs']['metadata']['ignoredHookedBlocks'],
    144             array( 'tests/hooked-block-added-by-filter' )
     143            ,
     144           
    145145        );
    146146    }
Note: See TracChangeset for help on using the changeset viewer.