Skip to content

Commit 195a347

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 f692dcb commit 195a347

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
@@ -27,6 +27,11 @@ public function createCachePool()
2727
return new FilesystemCachePool($this->getFilesystem());
2828
}
2929

30+
public function createSimpleCache()
31+
{
32+
return $this->createCachePool();
33+
}
34+
3035
private function getFilesystem()
3136
{
3237
if ($this->filesystem === null) {

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

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,13 @@
2626
"require": {
2727
"php": "^5.5 || ^7.0",
2828
"psr/cache": "^1.0",
29+
"psr/simple-cache": "^1.0",
2930
"cache/adapter-common": "^0.4",
3031
"league/flysystem": "^1.0"
3132
},
3233
"require-dev": {
3334
"phpunit/phpunit": "^4.0 || ^5.1",
34-
"cache/integration-tests": "^0.14"
35+
"cache/integration-tests": "^0.16"
3536
},
3637
"provide": {
3738
"psr/cache-implementation": "^1.0"

0 commit comments

Comments
 (0)