Skip to content

Commit a63c33c

Browse files
committed
Added tests
1 parent 43b4a4d commit a63c33c

3 files changed

Lines changed: 70 additions & 1 deletion

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ $item = $pool->getItem('|users|4711|followers');
2020
$pool->deleteItem($item);
2121

2222
$pool->hasItem('|users|4711|followers|12|likes'); // False
23-
2423
```
2524

2625
| Feature | Supported |

tests/IntegrationPoolTest.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
/*
4+
* This file is part of php-cache\apc-adapter package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
10+
*/
11+
12+
namespace Cache\Hierarchy;
13+
14+
use Cache\Adapter\Apc\ApcCachePool;
15+
use Cache\Adapter\PHPArray\ArrayCachePool;
16+
use Cache\IntegrationTests\CachePoolTest as BaseTest;
17+
18+
class IntegrationPoolTest extends BaseTest
19+
{
20+
private $cache;
21+
22+
public function createCachePool()
23+
{
24+
return new HierarchicalCachePool($this->getCache());
25+
}
26+
27+
public function getCache()
28+
{
29+
if ($this->cache === null) {
30+
$this->cache = new ArrayCachePool();
31+
}
32+
33+
return $this->cache;
34+
}
35+
}

tests/IntegrationTagTest.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
/*
4+
* This file is part of php-cache\apc-adapter package.
5+
*
6+
* (c) 2015-2015 Aaron Scherer <aequasi@gmail.com>, Tobias Nyholm <tobias.nyholm@gmail.com>
7+
*
8+
* This source file is subject to the MIT license that is bundled
9+
* with this source code in the file LICENSE.
10+
*/
11+
12+
namespace Cache\Hierarchy;
13+
14+
use Cache\Adapter\Apc\ApcCachePool;
15+
use Cache\Adapter\PHPArray\ArrayCachePool;
16+
use Cache\IntegrationTests\TaggableCachePoolTest;
17+
18+
class IntegrationTagTest extends TaggableCachePoolTest
19+
{
20+
private $cache;
21+
22+
public function createCachePool()
23+
{
24+
return new HierarchicalCachePool($this->getCache());
25+
}
26+
27+
public function getCache()
28+
{
29+
if ($this->cache === null) {
30+
$this->cache = new ArrayCachePool();
31+
}
32+
33+
return $this->cache;
34+
}
35+
}

0 commit comments

Comments
 (0)