Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jun 6, 2020
1 parent 7705066 commit 0baece2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/framework/console/controllers/CacheControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ protected function setUp()
{
parent::setUp();

$this->_cacheController = Yii::createObject([
'class' => 'yiiunit\framework\console\controllers\SilencedCacheController',
'interactive' => false,
], [null, null]); //id and module are null

$databases = self::getParam('databases');
$config = $databases[$this->driverName];
$pdoDriver = 'pdo_' . $this->driverName;
Expand Down Expand Up @@ -73,6 +68,11 @@ protected function setUp()
],
]);

$this->_cacheController = Yii::createObject([
'class' => 'yiiunit\framework\console\controllers\SilencedCacheController',
'interactive' => false,
], [null, null]); //id and module are null

if (isset($config['fixture'])) {
Yii::$app->db->open();
$lines = explode(';', file_get_contents($config['fixture']));
Expand Down
3 changes: 2 additions & 1 deletion tests/framework/web/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ public function testRedirect()
protected function setUp()
{
parent::setUp();
$this->mockWebApplication();
$this->controller = new FakeController('fake', new \yii\web\Application([
'id' => 'app',
'basePath' => __DIR__,
Expand All @@ -130,6 +131,6 @@ protected function setUp()
],
],
]));
$this->mockWebApplication(['controller' => $this->controller]);
Yii::$app->controller = $this->controller;
}
}

0 comments on commit 0baece2

Please sign in to comment.