mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-09 09:47:25 +08:00
Improved console controller tests
This commit is contained in:
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user