Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pls78 committed Nov 5, 2024
1 parent 4c7fe9c commit 5af15d8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/Unit/Presenters/Open_Graph/Image_Presenter_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,17 @@ public function test_filter_wrong_image_url_returned() {
->with( 'https://example.com/image.jpg', $this->presentation )
->andReturn( false );

$this->assertEquals( [ [ 'url' => 'https://example.com/image.jpg' ] ], $this->instance->get() );
$this->assertEquals(
[
[
'url' => 'https://example.com/image.jpg',
'type' => '',
'width' => '',
'height' => '',
],
],
$this->instance->get()
);
}

/**
Expand Down Expand Up @@ -180,6 +190,7 @@ public function test_get() {
'url' => 'https://example.com/image.jpg',
'width' => 100,
'height' => 100,
'type' => '',
];

$this->presentation->open_graph_images = [ $raw_image ];
Expand Down

0 comments on commit 5af15d8

Please sign in to comment.