- Timestamp:
- 07/02/2024 10:01:17 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-templates/buildBlockTemplateResultFromPost.php
r57627 r58614 112 112 } 113 113 114 /* 115 * @ticket 59646 116 * @ticket 60506 117 * @ticket 60854 118 */ 119 public function test_should_injected_hooked_block_into_template_part_first_child() { 120 register_block_type( 121 'tests/my-block', 122 array( 123 'block_hooks' => array( 124 'core/template-part' => 'first_child', 125 ), 126 ) 127 ); 128 129 $template_part = _build_block_template_result_from_post( 130 self::$template_part_post, 131 'wp_template_part' 132 ); 133 $this->assertStringStartsWith( '<!-- wp:tests/my-block /-->', $template_part->content ); 134 } 135 136 /* 137 * @ticket 59646 138 * @ticket 60506 139 * @ticket 60854 140 */ 141 public function test_should_injected_hooked_block_into_template_part_last_child() { 142 register_block_type( 143 'tests/my-block', 144 array( 145 'block_hooks' => array( 146 'core/template-part' => 'last_child', 147 ), 148 ) 149 ); 150 151 $template_part = _build_block_template_result_from_post( 152 self::$template_part_post, 153 'wp_template_part' 154 ); 155 $this->assertStringEndsWith( '<!-- wp:tests/my-block /-->', $template_part->content ); 156 } 157 114 158 /** 115 159 * @ticket 59646
Note: See TracChangeset
for help on using the changeset viewer.