Skip to content
Permalink
Browse files

Swallow the "--quiet" shell parameter before calling PHPUnit.

PHPUnit does not provide a silent or quiet mode, so we cannot pass it along:
https://phpunit.de/manual/3.7/en/phpunit-book.html#textui.clioptions

Resolves #7432
  • Loading branch information...
ravage84 committed Sep 22, 2015
1 parent 851ff44 commit 5b41a9b52da28ea53f3c72a781e3559c14a6c60f
Showing with 19 additions and 0 deletions.
  1. +1 −0 lib/Cake/Console/Command/TestShell.php
  2. +18 −0 lib/Cake/Test/Case/Console/Command/TestShellTest.php
@@ -222,6 +222,7 @@ protected function _runnerOptions() {
$options = array();
$params = $this->params;
unset($params['help']);
unset($params['quiet']);
if (!empty($params['no-colors'])) {
unset($params['no-colors'], $params['colors']);
@@ -341,4 +341,22 @@ public function testRunnerOptions() {
);
$this->Shell->main();
}
/**
* Tests that the 'quiet' parameter gets swallowed before calling PHPUnit
*
* @return void
*/
public function testRunnerOptionsQuiet() {
$this->Shell->startup();
$this->Shell->args = array('core', 'Basics');
$this->Shell->params = array('quiet' => true);
$this->Shell->expects($this->once())->method('_run')
->with(
array('app' => false, 'plugin' => null, 'core' => true, 'output' => 'text', 'case' => 'Basics'),
array('--colors')
);
$this->Shell->main();
}
}

0 comments on commit 5b41a9b

Please sign in to comment.
You can’t perform that action at this time.