From d039605dd1364eb43001c988d6ffcc9c70849165 Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Tue, 19 Sep 2017 15:49:51 +0300 Subject: [PATCH] `DbManagerTestCase` unit test fix --- tests/framework/rbac/DbManagerTestCase.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/framework/rbac/DbManagerTestCase.php b/tests/framework/rbac/DbManagerTestCase.php index 063febd..eeeadaa 100644 --- a/tests/framework/rbac/DbManagerTestCase.php +++ b/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');