Make WordPress Core

Changeset 56607

Timestamp:
09/18/2023 10:33:24 AM (11 months ago)
Author:
gziolo
Message:

Tests: Add additional tests covering Block Hooks registration

Props ockham.
See #59346.
Follow-up [56587].

Location:
trunk/tests/phpunit
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/data/blocks/notice/block.json

    r56587 r56607  
    3232    },
    3333    "blockHooks": {
    34         "core/post-content": "before"
     34        "tests/before": "before",
     35        "tests/after": "after",
     36        "tests/first-child": "firstChild",
     37        "tests/last-child": "lastChild"
    3538    },
    3639    "supports": {
  • trunk/tests/phpunit/tests/blocks/register.php

    r56587 r56607  
    646646        );
    647647        // @ticket 59346
    648         $this->assertSame(
    649             array( 'core/post-content' => 'before' ),
     648        $this->assertSameSets(
     649            array(
     650                'tests/before'      => 'before',
     651                'tests/after'       => 'after',
     652                'tests/first-child' => 'first_child',
     653                'tests/last-child'  => 'last_child',
     654            ),
    650655            $result->block_hooks,
    651656            'Block type should contain block hooks from metadata.'
     
    10701075        $this->assertTrue( $actual );
    10711076    }
     1077
     1078
     1079
     1080
     1081
     1082
     1083
     1084
     1085
     1086
     1087
     1088
     1089
     1090
     1091
     1092
     1093
     1094
    10721095}
Note: See TracChangeset for help on using the changeset viewer.