From ba19b86902f1e8f30d164df332afc326164337bf Mon Sep 17 00:00:00 2001
From: Christian Kuhn <lolli@schwarzbu.ch>
Date: Tue, 28 Nov 2017 12:51:26 +0100
Subject: [PATCH] [FOLLOWUP][BUGFIX] Check simplexml return type in ImageInfo

Fix unit test which fails on current master since last patch
set has been too long ago and no re-run was triggered after
subject class changed meanwhile.

Change-Id: Iade31ab04fff4a48bd87f3c0052a93ea54005109
Resolves: #79881
Releases: master
Reviewed-on: https://review.typo3.org/54829
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
---
 .../sysext/core/Tests/Unit/Type/File/ImageInfoTest.php | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/typo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php b/typo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php
index 0a1af8afb6e4..b0eb7b024643 100644
--- a/typo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php
+++ b/typo3/sysext/core/Tests/Unit/Type/File/ImageInfoTest.php
@@ -17,6 +17,7 @@ namespace TYPO3\CMS\Core\Tests\Unit\Type\File;
 
 use org\bovigo\vfs\vfsStream;
 use TYPO3\CMS\Core\Imaging\GraphicalFunctions;
+use TYPO3\CMS\Core\Log\Logger;
 use TYPO3\CMS\Core\Type\File\ImageInfo;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
@@ -52,15 +53,14 @@ class ImageInfoTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
         ];
 
         $graphicalFunctionsProphecy = $this->prophesize(GraphicalFunctions::class);
+        $graphicalFunctionsProphecy->init()->shouldBeCalled();
         $graphicalFunctionsProphecy->imageMagickIdentify($root->url() . '/' . $testFile)->willReturn(null);
-
-        $imageInfoProphecy = $this->prophesize(ImageInfo::class)
-            ->willBeConstructedWith([$root->url() . '/' . $testFile]);
-        $imageInfoProphecy->getGraphicalFunctions()->willReturn($graphicalFunctionsProphecy->reveal());
-
         GeneralUtility::addInstance(GraphicalFunctions::class, $graphicalFunctionsProphecy->reveal());
 
+        $loggerProphecy = $this->prophesize(Logger::class);
+
         $imageInfo = new ImageInfo($root->url() . '/' . $testFile);
+        $imageInfo->setLogger($loggerProphecy->reveal());
 
         $this->assertEquals(0, $imageInfo->getWidth());
         $this->assertEquals(0, $imageInfo->getHeight());
-- 
GitLab