Esempio n. 1
0
 /**
  * @return string
  */
 protected function getExpectedContent()
 {
     $files = $this->fileUtility->getFiles([$this->fileUtility->getPathToSource() . static::EXPECTED], 'config.xml');
     return file_get_contents(reset($files));
 }
Esempio n. 2
0
 protected function _setNamespaceBlackList()
 {
     if (!isset(self::$_namespaceBlacklist)) {
         $blackList = [];
         foreach (glob(__DIR__ . '/_files/blacklist/namespace.txt') as $list) {
             $fileList = file($list, FILE_IGNORE_NEW_LINES);
             foreach ($fileList as $currentFile) {
                 $absolutePath = \Magento\Framework\App\Utility\Files::init()->getPathToSource() . '/' . $currentFile;
                 if (is_dir($absolutePath)) {
                     $recursiveFiles = \Magento\Framework\App\Utility\Files::getFiles([$absolutePath], '*.php', true);
                     $blackList = array_merge($blackList, $recursiveFiles);
                 } else {
                     array_push($blackList, $currentFile);
                 }
             }
         }
         self::$_namespaceBlacklist = $blackList;
     }
 }