Files
roundcubemail/tests/Framework/Cache.php
Michael Voříšek e7d7e62146 Modernize more basic CS II (#9254)
* 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"
2023-12-17 13:14:45 +01:00

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));
}
}