Improved console controller tests

This commit is contained in:
Alexander Makarov
2014-11-27 03:39:00 +03:00
parent 3c70d3c317
commit 338b334254
6 changed files with 61 additions and 15 deletions

View File

@ -16,7 +16,7 @@ class CacheControllerTest extends TestCase
{
/**
* @var \yiiunit\framework\console\controllers\CacheConsoledController
* @var SilencedCacheController
*/
private $_cacheController;
@ -27,7 +27,7 @@ class CacheControllerTest extends TestCase
parent::setUp();
$this->_cacheController = Yii::createObject([
'class' => 'yiiunit\framework\console\controllers\CacheConsoledController',
'class' => 'yiiunit\framework\console\controllers\SilencedCacheController',
'interactive' => false,
],[null, null]); //id and module are null
@ -122,7 +122,7 @@ class CacheControllerTest extends TestCase
}
/**
* @expectedException yii\console\Exception
* @expectedException \yii\console\Exception
*/
public function testNothingToFlushException()
{
@ -141,12 +141,3 @@ class CacheControllerTest extends TestCase
}
}
class CacheConsoledController extends CacheController
{
public function stdout($string)
{
}
}