From 96928bbb71b1d4f2a0931086b450f0f56f975493 Mon Sep 17 00:00:00 2001 From: Jan Helke Date: Thu, 15 Mar 2018 20:40:00 +0100 Subject: [PATCH] [TASK] Make MethodArgumentDroppedStaticMatcherTest notice free Releases: master Resolves: #84315 Change-Id: I6bb30f6289d5c5a9e5c36f21ab89cf4b84b5bad7 Reviewed-on: https://review.typo3.org/56188 Tested-by: TYPO3com Reviewed-by: Anja Leichsenring Tested-by: Anja Leichsenring Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn --- .../MethodArgumentDroppedStaticMatcherTest.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodArgumentDroppedStaticMatcherTest.php b/typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodArgumentDroppedStaticMatcherTest.php index 3262cdb176c1..3e8a97a2ed14 100644 --- a/typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodArgumentDroppedStaticMatcherTest.php +++ b/typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/MethodArgumentDroppedStaticMatcherTest.php @@ -26,11 +26,6 @@ */ class MethodArgumentDroppedStaticMatcherTest extends UnitTestCase { - /** - * Subject is not notice free, disable E_NOTICES - */ - protected static $suppressNotices = true; - /** * @test */ @@ -70,7 +65,7 @@ public function hitsFromFixtureAreFound() /** * @return array */ - public function matchesReturnsExpectedRestFilesDataProvider() + public function matchesReturnsExpectedRestFilesDataProvider(): array { return [ 'two rest candidates with same number of arguments' => [ @@ -234,6 +229,9 @@ public function matchesReturnsExpectedRestFilesDataProvider() /** * @test * @dataProvider matchesReturnsExpectedRestFilesDataProvider + * @param array $configuration + * @param string $phpCode + * @param array $expected */ public function matchesReturnsExpectedRestFiles(array $configuration, string $phpCode, array $expected) { @@ -247,6 +245,10 @@ public function matchesReturnsExpectedRestFiles(array $configuration, string $ph $traverser->traverse($statements); $result = $subject->getMatches(); - $this->assertEquals($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); + } } }