Make WordPress Core

Changeset 56584

Timestamp:
09/14/2023 11:45:51 AM (12 months ago)
Author:
gziolo
Message:

Tests: Split tests for _inject_theme_attribute_in_template_part_block

Follow-up to [56578].
See #59338.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-template-utils.php

    r56579 r56584  
    258258            '`theme` attribute was not correctly injected in template part block.'
    259259        );
    260 
    261         // Does not inject theme when there is an existing theme attribute.
     260    }
     261
     262    /**
     263     * @ticket 59338
     264     *
     265     * @covers ::_inject_theme_attribute_in_template_part_block
     266     */
     267    public function test_not_inject_theme_attribute_in_template_part_block_theme_attribute_exists() {
    262268        $template_part_block_with_existing_theme_attribute = array(
    263269            'blockName'    => 'core/template-part',
     
    280286            'Existing `theme` attribute in template part block was not respected by attribute injection.'
    281287        );
    282 
    283         // Does not inject theme when there is no template part.
     288    }
     289
     290    /**
     291     * @ticket 59338
     292     *
     293     * @covers ::_inject_theme_attribute_in_template_part_block
     294     */
     295    public function test_not_inject_theme_attribute_non_template_part_block() {
    284296        $non_template_part_block = array(
    285297            'blockName'    => 'core/post-content',
Note: See TracChangeset for help on using the changeset viewer.