Browse Source

`DbManagerTestCase` unit test fix

tags/3.0.0-alpha1
Klimov Paul 7 years ago
parent
commit
d039605dd1
  1. 3
      tests/framework/rbac/DbManagerTestCase.php

3
tests/framework/rbac/DbManagerTestCase.php

@ -10,6 +10,7 @@ namespace yiiunit\framework\rbac;
use Psr\Log\LogLevel;
use Yii;
use yii\caching\ArrayCache;
use yii\caching\Cache;
use yii\console\Application;
use yii\console\ExitCode;
use yii\db\Connection;
@ -296,7 +297,7 @@ abstract class DbManagerTestCase extends ManagerTestCase
$this->prepareData();
// warm up item cache, so only assignment queries are sent to DB
$this->auth->cache = new ArrayCache();
$this->auth->cache = new Cache(['handler' => new ArrayCache()]);
$this->auth->checkAccess('author B', 'readPost');
$this->auth->checkAccess(new UserID('author B'), 'createPost');

Loading…
Cancel
Save