Skip to content

Commit

Permalink
Fix tests for WP 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
obenland committed Jan 8, 2025
1 parent b53c595 commit 7107abc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/includes/transformer/class-test-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,16 @@ public function test_block_attachments_with_fallback() {
)
);

// For WP versions 6.1 and prior, we only look for attached images.
if ( ! class_exists( 'WP_HTML_Tag_Processor' ) ) {
wp_update_post(
array(
'ID' => $attachment_id,
'post_parent' => $post_id,
)
);
}

$object = Post::transform( get_post( $post_id ) )->to_object();

$this->assertEquals(
Expand Down

0 comments on commit 7107abc

Please sign in to comment.