1. Go to this page and download the library: Download cache/integration-tests library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cache / integration-tests example snippets
use Cache\IntegrationTests\CachePoolTest;
use Psr\Cache\CacheItemPoolInterface;
final class PoolIntegrationTest extends CachePoolTest
{
public function createCachePool(): CacheItemPoolInterface
{
return new MyCachePool();
}
}
use Cache\IntegrationTests\TaggableCachePoolTest;
use Cache\TagInterop\TaggableCacheItemPoolInterface;
final class TagIntegrationTest extends TaggableCachePoolTest
{
public function createCachePool(): TaggableCacheItemPoolInterface
{
return new MyTaggableCachePool();
}
}
use Cache\IntegrationTests\SimpleCacheTest;
use Psr\SimpleCache\CacheInterface;
final class SimpleCacheIntegrationTest extends SimpleCacheTest
{
public function createSimpleCache(): CacheInterface
{
return new MySimpleCache();
}
}
use Cache\IntegrationTests\CachePoolTest;
use Psr\Cache\CacheItemPoolInterface;
final class PoolWithSkippedExpirationTest extends CachePoolTest
{
/** @var array<string, string> */
protected array $skippedTests = [
'testExpiration' => 'This backend does not support expiration.',
];
public function createCachePool(): CacheItemPoolInterface
{
return new MyCachePool();
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.