Skip to content

Commit 5c3b726

Browse files
committed
Merge pull request #1 from Nyholm/patch-1
Bugfix
2 parents d96d348 + 8694d09 commit 5c3b726

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/ArrayCachePool.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class ArrayCachePool extends AbstractCachePool
2727
/**
2828
* @param array $cache
2929
*/
30-
public function __construct(array $cache = [])
30+
public function __construct(array &$cache = [])
3131
{
32-
$this->cache = $cache;
32+
$this->cache = &$cache;
3333
}
3434

3535
protected function fetchObjectFromCache($key)

tests/IntegrationPoolTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
class IntegrationPoolTest extends CachePoolTest
1818
{
19+
private $cacheArray = [];
20+
1921
public function createCachePool()
2022
{
21-
return new ArrayCachePool();
23+
return new ArrayCachePool($this->cacheArray);
2224
}
2325
}

tests/IntegrationTagTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
class IntegrationTagTest extends TaggableCachePoolTest
1818
{
19-
private $cache = [];
19+
private $cacheArray = [];
2020

2121
public function createCachePool()
2222
{
23-
return new ArrayCachePool($this->cache);
23+
return new ArrayCachePool($this->cacheArray);
2424
}
2525
}

0 commit comments

Comments
 (0)