Fixes #15221: Console improvements

This commit is contained in:
Brandon Kelly
2017-11-25 22:43:05 -08:00
committed by Alexander Makarov
parent c9faed4480
commit 0948109a19
6 changed files with 68 additions and 2 deletions

View File

@ -58,6 +58,11 @@ class ControllerTest extends TestCase
$this->assertEquals('from params', $fromParam);
$this->assertEquals('notdefault', $other);
$params = ['test-array' => 'from params,notdefault'];
list($fromParam, $other) = $controller->runAction('aksi6', $params);
$this->assertEquals('from params', $fromParam);
$this->assertEquals('notdefault', $other);
$params = ['avaliable'];
$message = Yii::t('yii', 'Missing required arguments: {params}', ['params' => implode(', ', ['missing'])]);
$this->expectException('yii\console\Exception');