From da56e0a54105760be744ab68545c282f7cc140c9 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sat, 15 Jun 2019 22:27:20 -0400 Subject: [PATCH] Add tests folder to typo console coverage - Use correct config object in Console\Typo --- src/Console/Typo.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Console/Typo.php b/src/Console/Typo.php index 5f5fa0ba68..216d057232 100644 --- a/src/Console/Typo.php +++ b/src/Console/Typo.php @@ -43,7 +43,7 @@ HELP; throw new \Asika\SimpleConsole\CommandArgsException('Too many arguments'); } - $php_path = BaseObject::getApp()->getConfigCache()->get('config', 'php_path', 'php'); + $php_path = BaseObject::getApp()->getConfig()->get('config', 'php_path', 'php'); if ($this->getOption('v')) { $this->out('Directory: src'); @@ -57,6 +57,18 @@ HELP; } } + if ($this->getOption('v')) { + $this->out('Directory: tests'); + } + + $Iterator = new \RecursiveDirectoryIterator('tests'); + + foreach (new \RecursiveIteratorIterator($Iterator) as $file) { + if (substr($file, -4) === '.php') { + $this->checkFile($php_path, $file); + } + } + if ($this->getOption('v')) { $this->out('Directory: mod'); }