/** * Tests (in|ex)clude regex patterns * * The regex patterns will be tested against any files found in the * read directories or specified manually and the results returned in * an associative array of [include],[exclude],[workable] files. * * @return array */ public function testRegexPatterns() { try { $this->validateRequiredConfigData(); return $this->fileNameWorker->testRegexPatterns($this->config); } catch (MockMakerFatalException $e) { echo "\n\nFatal MockMakerException: {$e->getMessage()}\n\n"; } }
/** * Sets the files to generate mocks for * * @param string|array $filesToMock Files to be mocked */ public function setFilesToMock(array $filesToMock) { FileWorker::validateFiles($filesToMock); $this->filesToMock = $filesToMock; }
/** * FIlters files based on regex options * * @param ConfigData $config * @return array */ private function filterUnwantedFiles(ConfigData $config) { $fileWorker = new FileWorker(); return $fileWorker->filterFilesWithRegex($config); }