mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-09 17:46:51 +01:00
* fix "integer_literal_case" * fix "phpdoc_separation" * fix "phpdoc_var_without_name" * fix "operator_linebreak" * fix "no_alias_language_construct_call" * fix "list_syntax" * fix "concat_space" * fix "array_syntax" * fix "binary_operator_spaces" * fix "binary_operator_spaces" relaxed * fix "phpdoc_types_order" * fix "phpdoc_trim" * fix "native_type_declaration_casing" * fix "method_chaining_indentation" * fix "phpdoc_no_package" * fix "elseif" * fix PHP CS Fixer config itself too * fix "native_type_declaration_casing"
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));
|
|
}
|
|
}
|