diff --git a/src/Cli/Kahlan.php b/src/Cli/Kahlan.php index 9bc8b70c..7b30d78b 100644 --- a/src/Cli/Kahlan.php +++ b/src/Cli/Kahlan.php @@ -508,7 +508,9 @@ protected function _console() $params = $args + [ 'start' => $this->_start, 'colors' => !$this->commandLine()->get('no-colors'), - 'header' => !$this->commandLine()->get('no-header') + 'header' => !$this->commandLine()->get('no-header'), + 'src' => $this->commandLine()->get('src'), + 'spec' => $this->commandLine()->get('spec'), ]; if (isset($output) && strlen($output) > 0) { diff --git a/src/Reporter/Terminal.php b/src/Reporter/Terminal.php index b42dfa62..06e4b619 100644 --- a/src/Reporter/Terminal.php +++ b/src/Reporter/Terminal.php @@ -67,6 +67,21 @@ class Terminal extends Reporter 'dot' => '.' ]; + + /** + * src directory to be tested. + * + * @var array + */ + protected $_srcDir = ['src']; + + /** + * spec directory. + * + * @var array + */ + protected $_specDir = ['spec']; + /** * The constructor. * @@ -94,6 +109,14 @@ public function __construct($config = []) $this->_symbols['err'] = "\x78"; $this->_symbols['dot'] = '.'; } + + if (isset($config['src'])) { + $this->_srcDir = $config['src']; + } + + if (isset($config['spec'])) { + $this->_specDir = $config['spec']; + } } /** @@ -133,8 +156,12 @@ public function start($args) } $this->write($this->kahlan() . "\n\n"); $this->write($this->kahlanBaseline() . "\n", 'dark-grey'); - $this->write("\nWorking Directory: ", 'blue'); + $this->write("\nWorking Directory : ", 'blue'); $this->write(getcwd() . "\n"); + $this->write("src Directory : ", 'blue'); + $this->write(join(', ', array_map('realpath', $this->_srcDir)) . "\n"); + $this->write("spec Directory : ", 'blue'); + $this->write(join(', ', array_map('realpath', $this->_specDir)) . "\n"); } /**