Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/php-cache/integration-tests
Integration tests for your PSR-6 cache implementation
https://github.com/php-cache/integration-tests
Last synced: 3 months ago
JSON representation
Integration tests for your PSR-6 cache implementation
- Host: GitHub
- URL: https://github.com/php-cache/integration-tests
- Owner: php-cache
- License: mit
- Created: 2015-12-08T21:49:18.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-08-02T12:00:44.000Z (over 3 years ago)
- Last Synced: 2024-07-23T22:24:59.523Z (4 months ago)
- Language: PHP
- Homepage: http://www.php-cache.com
- Size: 132 KB
- Stars: 38
- Watchers: 7
- Forks: 32
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PSR-6 and PSR-16 Integration tests
[![Gitter](https://badges.gitter.im/php-cache/cache.svg)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Latest Stable Version](https://poser.pugx.org/cache/integration-tests/v/stable)](https://packagist.org/packages/cache/integration-tests)
[![Total Downloads](https://poser.pugx.org/cache/integration-tests/downloads)](https://packagist.org/packages/cache/integration-tests)
[![Monthly Downloads](https://poser.pugx.org/cache/integration-tests/d/monthly.png)](https://packagist.org/packages/cache/integration-tests)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](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).