mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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
This commit is contained in:
parent
851ff44b4c
commit
5b41a9b52d
2 changed files with 19 additions and 0 deletions
|
@ -222,6 +222,7 @@ class TestShell extends Shell {
|
||||||
$options = array();
|
$options = array();
|
||||||
$params = $this->params;
|
$params = $this->params;
|
||||||
unset($params['help']);
|
unset($params['help']);
|
||||||
|
unset($params['quiet']);
|
||||||
|
|
||||||
if (!empty($params['no-colors'])) {
|
if (!empty($params['no-colors'])) {
|
||||||
unset($params['no-colors'], $params['colors']);
|
unset($params['no-colors'], $params['colors']);
|
||||||
|
|
|
@ -341,4 +341,22 @@ class TestShellTest extends CakeTestCase {
|
||||||
);
|
);
|
||||||
$this->Shell->main();
|
$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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue