Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dkotter committed Apr 25, 2024
1 parent 67be210 commit 81bb90e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/test-safe-svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,5 +341,16 @@ public function test_featured_image_fix() {

$response = $this->instance->featured_image_fix( 'test', 1, 1 );
$this->assertSame( '<span class="svg">test</span>', $response );

\WP_Mock::userFunction(
'get_post_mime_type',
array(
'args' => null,
'return' => false,
)
);

$response = $this->instance->featured_image_fix( 'test', 1 );
$this->assertSame( 'test', $response );
}
}

0 comments on commit 81bb90e

Please sign in to comment.