diff --git a/tests/unit/extensions/mongodb/console/controllers/EchoMigrateController.php b/tests/unit/extensions/mongodb/console/controllers/EchoMigrateController.php new file mode 100644 index 0000000000..3d5cc0c818 --- /dev/null +++ b/tests/unit/extensions/mongodb/console/controllers/EchoMigrateController.php @@ -0,0 +1,18 @@ +migrateControllerClass = MigrateController::className(); + $this->migrateControllerClass = EchoMigrateController::className(); $this->migrationBaseClass = Migration::className(); parent::setUp(); diff --git a/tests/unit/framework/console/controllers/CacheControllerTest.php b/tests/unit/framework/console/controllers/CacheControllerTest.php index 8c031cd2ef..714c6f150e 100644 --- a/tests/unit/framework/console/controllers/CacheControllerTest.php +++ b/tests/unit/framework/console/controllers/CacheControllerTest.php @@ -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) - { - } - -} diff --git a/tests/unit/framework/console/controllers/EchoMigrateController.php b/tests/unit/framework/console/controllers/EchoMigrateController.php new file mode 100644 index 0000000000..9e362bd80b --- /dev/null +++ b/tests/unit/framework/console/controllers/EchoMigrateController.php @@ -0,0 +1,18 @@ +migrateControllerClass = MigrateController::className(); + $this->migrateControllerClass = EchoMigrateController::className(); $this->migrationBaseClass = Migration::className(); $this->mockApplication([ diff --git a/tests/unit/framework/console/controllers/SilencedCacheController.php b/tests/unit/framework/console/controllers/SilencedCacheController.php new file mode 100644 index 0000000000..40eed6ee29 --- /dev/null +++ b/tests/unit/framework/console/controllers/SilencedCacheController.php @@ -0,0 +1,20 @@ +