[TASK] Make AbstractCoreMatcherTest notice free 85/56185/2
authorJan Helke <typo3@helke.de>
Thu, 15 Mar 2018 19:03:23 +0000 (20:03 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 15 Mar 2018 20:04:46 +0000 (21:04 +0100)
Resolves: #84312
Releases: master
Change-Id: Iee54bf0b2ff71668b666020dbcba7ca2dcc03296
Reviewed-on: https://review.typo3.org/56185
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
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/Classes/ExtensionScanner/Php/Matcher/AbstractCoreMatcher.php
typo3/sysext/install/Tests/Unit/ExtensionScanner/Php/Matcher/AbstractCoreMatcherTest.php

index ab6bf70..a24182f 100644 (file)
@@ -107,7 +107,7 @@ abstract class AbstractCoreMatcher extends NodeVisitorAbstract implements CodeSc
             // Config broken if not all required array keys are specified in config
             $sharedArrays = array_intersect(array_keys($matcherDefinition), $requiredArrayKeys);
             if ($sharedArrays !== $requiredArrayKeys) {
-                $missingKeys = array_diff($requiredArrayKeys, $matcherDefinition);
+                $missingKeys = array_diff($requiredArrayKeys, array_keys($matcherDefinition));
                 throw new \InvalidArgumentException(
                     'Required matcher definitions missing: ' . implode(', ', $missingKeys) . ' offending key: ' . $key,
                     1500492001
index f7e8cdc..ee7d670 100644 (file)
@@ -24,11 +24,6 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
 class AbstractCoreMatcherTest extends UnitTestCase
 {
     /**
-     * Subject is not notice free, disable E_NOTICES
-     */
-    protected static $suppressNotices = true;
-
-    /**
      * @test
      */
     public function validateMatcherDefinitionsRunsFineWithProperDefinition()