Changeset 56644 for trunk/tests/phpunit/tests/block-template-utils.php
- Timestamp:
- 09/21/2023 08:32:52 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/block-template-utils.php
r56584 r56644 226 226 */ 227 227 public function test_inject_theme_attribute_in_template_part_block() { 228 $template_part_block _without_theme_attribute= array(228 $template_part_block = array( 229 229 'blockName' => 'core/template-part', 230 230 'attrs' => array( … … 239 239 ); 240 240 241 $actual = _inject_theme_attribute_in_template_part_block( $template_part_block_without_theme_attribute);241 _inject_theme_attribute_in_template_part_block( $template_part_block ); 242 242 $expected = array( 243 243 'blockName' => 'core/template-part', … … 255 255 $this->assertSame( 256 256 $expected, 257 $ actual,257 $template_part_block, 258 258 '`theme` attribute was not correctly injected in template part block.' 259 259 ); … … 266 266 */ 267 267 public function test_not_inject_theme_attribute_in_template_part_block_theme_attribute_exists() { 268 $template_part_block _with_existing_theme_attribute= array(268 $template_part_block = array( 269 269 'blockName' => 'core/template-part', 270 270 'attrs' => array( … … 280 280 ); 281 281 282 $actual = _inject_theme_attribute_in_template_part_block( $template_part_block_with_existing_theme_attribute ); 282 $expected = $template_part_block; 283 _inject_theme_attribute_in_template_part_block( $template_part_block ); 283 284 $this->assertSame( 284 $ template_part_block_with_existing_theme_attribute,285 $ actual,285 $expected, 286 $template_part_block, 286 287 'Existing `theme` attribute in template part block was not respected by attribute injection.' 287 288 ); … … 302 303 ); 303 304 304 $actual = _inject_theme_attribute_in_template_part_block( $non_template_part_block ); 305 $expected = $non_template_part_block; 306 _inject_theme_attribute_in_template_part_block( $non_template_part_block ); 305 307 $this->assertSame( 308 $expected, 306 309 $non_template_part_block, 307 $actual,308 310 '`theme` attribute injection modified non-template-part block.' 309 311 );
Note: See TracChangeset
for help on using the changeset viewer.