Skip to content

Commit

Permalink
Merge pull request #1 from Nyholm/patch-1
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
cryptiklemur committed Jan 7, 2016
2 parents d96d348 + 8694d09 commit 5c3b726
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/ArrayCachePool.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ class ArrayCachePool extends AbstractCachePool
/**
* @param array $cache
*/
public function __construct(array $cache = [])
public function __construct(array &$cache = [])
{
$this->cache = $cache;
$this->cache = &$cache;
}

protected function fetchObjectFromCache($key)
Expand Down
4 changes: 3 additions & 1 deletion tests/IntegrationPoolTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@

class IntegrationPoolTest extends CachePoolTest
{
private $cacheArray = [];

public function createCachePool()
{
return new ArrayCachePool();
return new ArrayCachePool($this->cacheArray);
}
}
4 changes: 2 additions & 2 deletions tests/IntegrationTagTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

class IntegrationTagTest extends TaggableCachePoolTest
{
private $cache = [];
private $cacheArray = [];

public function createCachePool()
{
return new ArrayCachePool($this->cache);
return new ArrayCachePool($this->cacheArray);
}
}

0 comments on commit 5c3b726

Please sign in to comment.