[TASK] Make MethodCallStaticMatcherTest notice free 93/56193/3
authorJan Helke <typo3@helke.de>
Thu, 15 Mar 2018 19:54:32 +0000 (20:54 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 15 Mar 2018 20:37:02 +0000 (21:37 +0100)
Releases: master
Resolves: #84320
Change-Id: I7f1d2f09609a60586c8b894ff7e939f956c10833
Reviewed-on: https://review.typo3.org/56193
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodCallStaticMatcherTest.php

index 64d4c3e..41f0183 100644 (file)
@@ -28,11 +28,6 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 class MethodCallStaticMatcherTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * @test
      */
     public function hitsFromFixtureAreFound()
@@ -288,6 +283,10 @@ class MethodCallStaticMatcherTest extends UnitTestCase
         $traverser->traverse($statements);
 
         $result = $subject->getMatches();
-        $this->assertSame($expected[0]['restFiles'], $result[0]['restFiles']);
+        if (isset($expected[0], $result[0])) {
+            $this->assertEquals($expected[0]['restFiles'], $result[0]['restFiles']);
+        } else {
+            $this->assertEquals($expected, $result);
+        }
     }
 }