Ignored README.md in SourceIntegrationTest

This commit is contained in:
Kevin Frantz 2019-02-12 16:52:27 +01:00
parent 5d4592e27c
commit ecfc8891e2

View File

@ -19,13 +19,17 @@ class SourceIntegrationTest extends TestCase
*/ */
protected $sources; protected $sources;
private function iterate(string $path) /**
* @param string $path
*/
private function iterate(string $path): void
{ {
$directoryIterator = new \DirectoryIterator($path); $directoryIterator = new \DirectoryIterator($path);
foreach ($directoryIterator as $fileInfo) { foreach ($directoryIterator as $fileInfo) {
if (!in_array($fileInfo->getFilename(), [ if (!in_array($fileInfo->getFilename(), [
'.', '.',
'..', '..',
'README.md',
])) { ])) {
$pathname = $fileInfo->getPathname(); $pathname = $fileInfo->getPathname();
if ($fileInfo->isDir()) { if ($fileInfo->isDir()) {
@ -43,6 +47,11 @@ class SourceIntegrationTest extends TestCase
$this->iterate(self::SOURCE_DIRECTORY); $this->iterate(self::SOURCE_DIRECTORY);
} }
/**
* @param string $path
*
* @return string
*/
private function filterSourcePath(string $path): string private function filterSourcePath(string $path): string
{ {
$path = str_replace('/Abstract', '/', $path); $path = str_replace('/Abstract', '/', $path);
@ -51,6 +60,11 @@ class SourceIntegrationTest extends TestCase
return $path; return $path;
} }
/**
* @param string $path
*
* @return string
*/
private function getInterfacePath(string $path): string private function getInterfacePath(string $path): string
{ {
return $this->filterSourcePath($path).'Interface.php'; return $this->filterSourcePath($path).'Interface.php';