mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-07 08:36:51 +01:00
* 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
30 lines
720 B
PHP
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));
|
|
}
|
|
}
|