assertNotContains( $legacyText, $commentText, "The license of file {$filename} contains legacy text." ); } } }, $this->legacyCommentDataProvider() ); } public function legacyCommentDataProvider() { $allFiles = \Magento\Framework\App\Utility\Files::init()->getAllFiles(); $result = []; foreach ($allFiles as $file) { if (!file_exists($file[0]) || !is_readable($file[0])) { continue; } $result[] = [$file[0]]; } return $result; } }