mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-06 08:14:08 +01:00
* Fix "single_quote"
* fix "escape_implicit_backslashes"
* fix typo from f363481c
* fix single quotes in JS
* fix some minor JS CS
* fix CS v3.45.0
30 lines
706 B
PHP
30 lines
706 B
PHP
<?php
|
|
|
|
/**
|
|
* Test class to test rcube_cache class
|
|
*/
|
|
class Framework_Cache extends PHPUnit\Framework\TestCase
|
|
{
|
|
/**
|
|
* Test factory method
|
|
*/
|
|
function test_factory()
|
|
{
|
|
$object = rcube_cache::factory('db', 1);
|
|
|
|
$this->assertInstanceOf('rcube_cache_db', $object, 'Class constructor');
|
|
$this->assertInstanceOf('rcube_cache', $object, 'Class constructor');
|
|
}
|
|
|
|
/**
|
|
* key_name() method
|
|
*/
|
|
function test_key_name()
|
|
{
|
|
$this->assertSame('test', rcube_cache::key_name('test'));
|
|
|
|
$params = ['test1' => 'test2'];
|
|
$this->assertSame('test.ad0234829205b9033196ba818f7a872b', rcube_cache::key_name('test', $params));
|
|
}
|
|
}
|