Files
roundcubemail/tests/Framework/Cache.php
Michael Voříšek 6a53a1d853 Fix CS (whitespace, visibility) (#9297)
* Fix "method_argument_space"

* Fix "control_structure_continuation_position"

* Fix "new_with_parentheses"

* Fix "blank_line_before_statement"

* Fix "visibility_required"

* Fix some "array_indentation"

* Fix some "array_indentation" - unify all "rcube::raise_error" calls

* rm useless eslint ignores and add rules counts

* sort eslint ignores

* fix eslint ignores grammar

* Revert "Fix "blank_line_before_statement""

* fix CS 3.46.0
2024-01-04 14:26:35 +01:00

30 lines
720 B
PHP

<?php
/**
* Test class to test rcube_cache class
*/
class Framework_Cache extends PHPUnit\Framework\TestCase
{
/**
* Test factory method
*/
public 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
*/
public 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));
}
}