1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-31 09:31:48 +02:00

Minify_Cache_APCu replaces APC

This commit is contained in:
Christoph Rönsch
2022-10-01 22:23:52 +02:00
parent 5112bb50f4
commit 455084b284
4 changed files with 163 additions and 1 deletions

View File

@@ -9,7 +9,6 @@ class MinifyCacheAPCTest extends TestCase
public function setUp()
{
if (!function_exists('apc_store')) {
// FIXME: is APCu extension ok too?
$this->markTestSkipped("To test this component, install APC extension");
}
}

View File

@@ -0,0 +1,25 @@
<?php
namespace Minify\Test;
use Minify_Cache_APCu;
class MinifyCacheAPCuTest extends TestCase
{
public function setUp()
{
if (!function_exists('apcu_store')) {
$this->markTestSkipped("To test this component, install APCu extension");
}
ini_set('apc.enable_cli', 1);
}
public function test1()
{
$data = str_repeat(md5(time()) . 'í', 100); // 3400 bytes in UTF-8
$id = 'Minify_test_cache';
$cache = new Minify_Cache_APCu();
$this->assertTestCache($cache, $id, $data);
}
}