1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
# PSR-6 and PSR-16 Integration tests
[](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[](https://packagist.org/packages/cache/integration-tests)
[](https://packagist.org/packages/cache/integration-tests)
[](https://packagist.org/packages/cache/integration-tests)
[](LICENSE)
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](http://www.php-cache.com).
### Install
```bash
composer require --dev cache/integration-tests:dev-master
```
### Use
Create a test that looks like this:
```php
class PoolIntegrationTest extends CachePoolTest
{
public function createCachePool()
{
return new CachePool();
}
}
```
You could also test your tag implementation:
```php
class TagIntegrationTest extends TaggableCachePoolTest
{
public function createCachePool()
{
return new CachePool();
}
}
```
You can also test a PSR-16 implementation:
```php
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](http://issues.php-cache.com).
|