From 5af15d866080be5c91a67fb7e915befafc3eea17 Mon Sep 17 00:00:00 2001 From: "Paolo L. Scala" Date: Tue, 5 Nov 2024 16:27:45 +0100 Subject: [PATCH] Fix unit tests --- .../Presenters/Open_Graph/Image_Presenter_Test.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/Unit/Presenters/Open_Graph/Image_Presenter_Test.php b/tests/Unit/Presenters/Open_Graph/Image_Presenter_Test.php index 38036ab93dc..360bbbb7f3d 100644 --- a/tests/Unit/Presenters/Open_Graph/Image_Presenter_Test.php +++ b/tests/Unit/Presenters/Open_Graph/Image_Presenter_Test.php @@ -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() + ); } /** @@ -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 ];