Make WordPress Core


Ignore:
Timestamp:
06/23/2023 09:28:10 AM (19 months ago)
Author:
oandregal
Message:

Fix block template utils test: use template part instead of template object.

Note that the PHP unit tests didn't fail in the CI job because the date for both the template and template part was the same.

Props ramonopoly.
Fixes #58540.

File:
1 edited

Legend:

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

    r55992 r55993  
    102102        $this->assertSame( 'Description of my template', $template->description );
    103103        $this->assertSame( 'wp_template', $template->type );
    104         $this->assertSame( self::$template_post->post_modified, $template->modified );
     104        $this->assertSame( self::$template_post->post_modified, $template->modified, 'Template result properties match' );
    105105
    106106        // Test template parts.
     
    119119        $this->assertSame( 'wp_template_part', $template_part->type );
    120120        $this->assertSame( WP_TEMPLATE_PART_AREA_HEADER, $template_part->area );
    121         $this->assertSame( self::$template_part_post->post_modified, $template->modified );
     121        $this->assertSame( self::$template_part_post->post_modified, $template_part->modified, 'Template part result properties match' );
    122122    }
    123123
Note: See TracChangeset for help on using the changeset viewer.