cache / integration-tests
Integration tests for PSR-6 and PSR-16 cache implementations
Installs: 2 711 087
Dependents: 93
Suggesters: 0
Security: 0
Stars: 38
Watchers: 7
Forks: 33
Open Issues: 1
Requires
- php: >=5.5.9
- cache/tag-interop: ^1.0
- psr/cache: ~1.0
Requires (Dev)
- cache/cache: ^1.0
- illuminate/cache: ^5.4|^5.5|^5.6
- mockery/mockery: ^1.0
- symfony/cache: ^3.4.31|^4.3.4|^5.0
- symfony/phpunit-bridge: ^5.1
- tedivm/stash: ^0.14
Conflicts
- phpunit/phpunit: <4.8.35|<5.4.3,>=5.0
README
This repository contains integration tests to make sure your implementation of a PSR-6 and/or PSR-16 cache follows the rules by PHP-FIG. It is a part of the PHP Cache organisation. To read about us please read the shared documentation at www.php-cache.com.
Install
composer require --dev cache/integration-tests:dev-master
Use
Create a test that looks like this:
class PoolIntegrationTest extends CachePoolTest { public function createCachePool() { return new CachePool(); } }
You could also test your tag implementation:
class TagIntegrationTest extends TaggableCachePoolTest { public function createCachePool() { return new CachePool(); } }
You can also test a PSR-16 implementation:
class CacheIntegrationTest extends SimpleCacheTest { public function createSimpleCache() { return new SimpleCache(); } }
Contribute
Contributions are very welcome! Send a pull request or report any issues you find on the issue tracker.