Changeset 56805 for trunk/tests/phpunit/tests/blocks/getHookedBlocks.php
- Timestamp:
- 10/09/2023 04:38:25 PM (16 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/blocks/getHookedBlocks.php
r56759 r56805 63 63 */ 64 64 public function test_get_hooked_blocks_no_match_found() { 65 $result = get_hooked_blocks( 'tests/no-hooked-blocks');65 $result = get_hooked_blocks(); 66 66 67 67 $this->assertSame( array(), $result ); … … 99 99 $this->assertSame( 100 100 array( 101 'before' => array( 102 'tests/injected-one', 103 'tests/injected-two', 101 'tests/hooked-at-before' => array( 102 'before' => array( 103 'tests/injected-one', 104 'tests/injected-two', 105 ), 106 ), 107 'tests/hooked-at-after' => array( 108 'after' => array( 109 'tests/injected-one', 110 'tests/injected-two', 111 ), 112 ), 113 'tests/hooked-at-before-and-after' => array( 114 'before' => array( 115 'tests/injected-one', 116 ), 117 'after' => array( 118 'tests/injected-two', 119 ), 120 ), 121 'tests/hooked-at-first-child' => array( 122 'first_child' => array( 123 'tests/injected-two', 124 ), 125 ), 126 'tests/hooked-at-last-child' => array( 127 'last_child' => array( 128 'tests/injected-two', 129 ), 104 130 ), 105 131 ), 106 get_hooked_blocks( 'tests/hooked-at-before' ), 107 'block hooked at the before position' 108 ); 109 $this->assertSame( 110 array( 111 'after' => array( 112 'tests/injected-one', 113 'tests/injected-two', 114 ), 115 ), 116 get_hooked_blocks( 'tests/hooked-at-after' ), 117 'block hooked at the after position' 118 ); 119 $this->assertSame( 120 array( 121 'first_child' => array( 122 'tests/injected-two', 123 ), 124 ), 125 get_hooked_blocks( 'tests/hooked-at-first-child' ), 126 'block hooked at the first child position' 127 ); 128 $this->assertSame( 129 array( 130 'last_child' => array( 131 'tests/injected-two', 132 ), 133 ), 134 get_hooked_blocks( 'tests/hooked-at-last-child' ), 135 'block hooked at the last child position' 136 ); 137 $this->assertSame( 138 array( 139 'before' => array( 140 'tests/injected-one', 141 ), 142 'after' => array( 143 'tests/injected-two', 144 ), 145 ), 146 get_hooked_blocks( 'tests/hooked-at-before-and-after' ), 147 'block hooked before one block and after another' 132 get_hooked_blocks() 148 133 ); 149 134 }
Note: See TracChangeset
for help on using the changeset viewer.