markTestSkipped('tests:check-direct-dependency-use is not available in this version'); } $pluginName = 'DeviceDetectorCache'; $checkDirectDependencyUse = new CheckDirectDependencyUse(); $console = new \Piwik\Console(self::$fixture->piwikEnvironment); $console->addCommands([$checkDirectDependencyUse]); $command = $console->find('tests:check-direct-dependency-use'); $arguments = [ 'command' => 'tests:check-direct-dependency-use', '--plugin' => $pluginName, '--grep-vendor', ]; $inputObject = new ArrayInput($arguments); $command->run($inputObject, new NullOutput()); $this->assertEquals([ 'Symfony\Component\Console' => [ 'DeviceDetectorCache/tests/System/CheckDirectDependencyUseCommandTest.php' ], 'DeviceDetector' => [ 'DeviceDetectorCache/CachedEntry.php', 'DeviceDetectorCache/DeviceDetector/CachedBrowserParser.php', 'DeviceDetectorCache/DeviceDetector/CachedOperatingSystemParser.php', ] ], $checkDirectDependencyUse->usesFoundList[$pluginName]); } }