protected function setUp()
 {
     $this->fixtureDir = realpath(__DIR__ . '/../_files') . '/';
     $this->fixtureDirModule = $this->fixtureDir . 'code/Magento/FirstModule/';
     $this->sourceFilename = $this->fixtureDir . 'framework-dependencies.csv';
     $this->builder = ServiceLocator::getFrameworkDependenciesReportBuilder();
 }
 /**
  * Build Framework dependencies report
  *
  * @param string $outputPath
  * @return void
  */
 protected function buildReport($outputPath)
 {
     $filePaths = $this->registrar->getPaths(ComponentRegistrar::MODULE);
     $filesForParse = Files::init()->getFiles($filePaths, '*');
     $configFiles = Files::init()->getConfigFiles('module.xml', [], false);
     ServiceLocator::getFrameworkDependenciesReportBuilder()->build(['parse' => ['files_for_parse' => $filesForParse, 'config_files' => $configFiles, 'declared_namespaces' => Files::init()->getNamespaces()], 'write' => ['report_filename' => $outputPath]]);
 }
    /**
     * Build Framework dependencies report
     *
     * @param string $outputPath
     * @return void
     */
    protected function buildReport($outputPath)
    {
        $root = $this->directoryList->getRoot();
        $filePath = str_replace(
            $root,
            Files::init()->getPathToSource(),
            $this->directoryList->getPath(DirectoryList::MODULES) . '/Magento'
        );
        $filesForParse = Files::init()->getFiles([$filePath], '*');
        $configFiles = Files::init()->getConfigFiles('module.xml', [], false);

        ServiceLocator::getFrameworkDependenciesReportBuilder()->build(
            [
                'parse' => [
                    'files_for_parse' => $filesForParse,
                    'config_files' => $configFiles,
                    'declared_namespaces' => Files::init()->getNamespaces(),
                ],
                'write' => ['report_filename' => $outputPath],
            ]
        );
    }