Skip to content

Commit 8e04045

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 c146291 commit 8e04045

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

Tests/CreatePoolTrait.php

+5
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,9 @@ private function getClient()
3131

3232
return $this->client;
3333
}
34+
35+
public function createSimpleCache()
36+
{
37+
return $this->createCachePool();
38+
}
3439
}

Tests/IntegrationSimpleCacheTest.php

+19
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\Redis\Tests;
13+
14+
use Cache\IntegrationTests\SimpleCacheTest as BaseTest;
15+
16+
class IntegrationSimpleCacheTest extends BaseTest
17+
{
18+
use CreatePoolTrait;
19+
}

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,13 @@
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
},
3334
"require-dev": {
3435
"phpunit/phpunit": "^4.0 || ^5.1",
35-
"cache/integration-tests": "^0.14"
36+
"cache/integration-tests": "^0.16"
3637
},
3738
"suggest": {
3839
"ext-redis": "The extension required to use this pool."

0 commit comments

Comments
 (0)