11
11
12
12
namespace Symfony \Component \Security \Acl \Tests \Domain ;
13
13
14
- use Doctrine \Common \Cache \ArrayCache ;
14
+ use Doctrine \Common \Cache \Psr6 \DoctrineProvider ;
15
+ use PHPUnit \Framework \TestCase ;
16
+ use Symfony \Component \Cache \Adapter \ArrayAdapter ;
15
17
use Symfony \Component \Security \Acl \Domain \Acl ;
16
18
use Symfony \Component \Security \Acl \Domain \DoctrineAclCache ;
17
19
use Symfony \Component \Security \Acl \Domain \ObjectIdentity ;
18
20
use Symfony \Component \Security \Acl \Domain \PermissionGrantingStrategy ;
19
21
use Symfony \Component \Security \Acl \Domain \UserSecurityIdentity ;
20
22
21
- class DoctrineAclCacheTest extends \ PHPUnit \ Framework \ TestCase
23
+ class DoctrineAclCacheTest extends TestCase
22
24
{
23
25
protected $ permissionGrantingStrategy ;
24
26
@@ -29,7 +31,7 @@ public function testConstructorDoesNotAcceptEmptyPrefix($empty)
29
31
{
30
32
$ this ->expectException (\InvalidArgumentException::class);
31
33
32
- new DoctrineAclCache (new ArrayCache ( ), $ this ->getPermissionGrantingStrategy (), $ empty );
34
+ new DoctrineAclCache (DoctrineProvider:: wrap ( new ArrayAdapter () ), $ this ->getPermissionGrantingStrategy (), $ empty );
33
35
}
34
36
35
37
public function getEmptyValue ()
@@ -94,7 +96,7 @@ protected function getPermissionGrantingStrategy()
94
96
protected function getCache ($ cacheDriver = null , $ prefix = DoctrineAclCache::PREFIX )
95
97
{
96
98
if (null === $ cacheDriver ) {
97
- $ cacheDriver = new ArrayCache ( );
99
+ $ cacheDriver = DoctrineProvider:: wrap ( new ArrayAdapter () );
98
100
}
99
101
100
102
return new DoctrineAclCache ($ cacheDriver , $ this ->getPermissionGrantingStrategy (), $ prefix );
0 commit comments