Skip to content

Commit 80c45b4

Browse files
authored
Added support for simple cache (#134)
* Added support for SimpleCache * Added tests * Bugfix with cloning * Style fix * Minor * Updated integration tests version * Bugfix * Allow same keys * cs
1 parent c0e65b9 commit 80c45b4

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

Tests/CreatePoolTrait.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ public function createCachePool()
2323
return new PredisCachePool($this->getClient());
2424
}
2525

26+
public function createSimpleCache()
27+
{
28+
return $this->createCachePool();
29+
}
30+
2631
private function getClient()
2732
{
2833
if ($this->client === null) {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
/*
4+
* This file is part of php-cache organization.
5+
*
6+
* (c) 2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]>
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\Adapter\Predis\Tests;
13+
14+
use Cache\IntegrationTests\SimpleCacheTest;
15+
16+
class IntegrationSimpleCacheTest extends SimpleCacheTest
17+
{
18+
use CreatePoolTrait;
19+
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,14 @@
2727
"require": {
2828
"php": "^5.5 || ^7.0",
2929
"psr/cache": "^1.0",
30+
"psr/simple-cache": "^1.0",
3031
"cache/adapter-common": "^0.4",
3132
"cache/hierarchical-cache": "^0.4",
3233
"predis/predis": "^1.0"
3334
},
3435
"require-dev": {
3536
"phpunit/phpunit": "^4.0 || ^5.1",
36-
"cache/integration-tests": "^0.14"
37+
"cache/integration-tests": "^0.16"
3738
},
3839
"provide": {
3940
"psr/cache-implementation": "^1.0"

0 commit comments

Comments
 (0)