Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tagging 5.7.5.12 Former-commit-id: a2bf40c Former-commit-id: 275fad14a623d804ce19b9e63a34b049614fb24e
- Loading branch information
Showing
4 changed files
with
47 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
class FilesParseTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function testFilesParse() | ||
{ | ||
foreach ($this->getPhpFiles(DIR_BASE_CORE . "/src") as $file) { | ||
$this->loadFile(array_shift($file)); | ||
} | ||
} | ||
|
||
private function getPhpFiles($path) | ||
{ | ||
$directory = new RecursiveDirectoryIterator($path); | ||
$iterator = new RecursiveIteratorIterator($directory); | ||
return new RegexIterator($iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH); | ||
} | ||
|
||
private function loadFile($path) | ||
{ | ||
ob_start(); | ||
require_once $path; | ||
ob_end_clean(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters