mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/9983] Add a purge test.
PHPBB3-9983
This commit is contained in:
parent
90bd7858fd
commit
d9e636fab0
2 changed files with 21 additions and 0 deletions
15
tests/cache/common_test_case.php
vendored
15
tests/cache/common_test_case.php
vendored
|
@ -21,4 +21,19 @@ abstract class phpbb_cache_common_test_case extends phpbb_database_test_case
|
||||||
'File ACM put and get'
|
'File ACM put and get'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_purge()
|
||||||
|
{
|
||||||
|
$this->driver->put('test_key', 'test_value');
|
||||||
|
|
||||||
|
$this->assertEquals(
|
||||||
|
'test_value',
|
||||||
|
$this->driver->get('test_key'),
|
||||||
|
'File ACM put and get'
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->driver->purge();
|
||||||
|
|
||||||
|
$this->assertSame(false, $this->driver->get('test_key'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
6
tests/cache/null_driver_test.php
vendored
6
tests/cache/null_driver_test.php
vendored
|
@ -33,6 +33,12 @@ class phpbb_cache_null_driver_test extends phpbb_database_test_case
|
||||||
$this->assertSame(false, $this->driver->get('key'));
|
$this->assertSame(false, $this->driver->get('key'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function test_purge()
|
||||||
|
{
|
||||||
|
// does nothing
|
||||||
|
$this->driver->purge();
|
||||||
|
}
|
||||||
|
|
||||||
public function test_cache_sql()
|
public function test_cache_sql()
|
||||||
{
|
{
|
||||||
global $db, $cache;
|
global $db, $cache;
|
||||||
|
|
Loading…
Add table
Reference in a new issue