Skip to content

Commit

Permalink
In WordPress#4613 tests were added for test_build_block_template_resu…
Browse files Browse the repository at this point in the history
…lt_from_post

The wrong object was used in the template part assertion.

This commit corrects that.
  • Loading branch information
ramonjd committed Jun 23, 2023
1 parent 09a7c68 commit 7846814
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/phpunit/tests/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function test_build_block_template_result_from_post() {
$this->assertSame( 'My Template', $template->title );
$this->assertSame( 'Description of my template', $template->description );
$this->assertSame( 'wp_template', $template->type );
$this->assertSame( self::$template_post->post_modified, $template->modified );
$this->assertSame( self::$template_post->post_modified, $template->modified, 'Template result properties match' );

// Test template parts.
$template_part = _build_block_template_result_from_post(
Expand All @@ -118,7 +118,7 @@ public function test_build_block_template_result_from_post() {
$this->assertSame( 'Description of my template part', $template_part->description );
$this->assertSame( 'wp_template_part', $template_part->type );
$this->assertSame( WP_TEMPLATE_PART_AREA_HEADER, $template_part->area );
$this->assertSame( self::$template_part_post->post_modified, $template->modified );
$this->assertSame( self::$template_part_post->post_modified, $template_part->modified, 'Template part result properties match' );
}

public function test_build_block_template_result_from_file() {
Expand Down

0 comments on commit 7846814

Please sign in to comment.