mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-05 07:44:01 +01:00
* fix Tests\Browser\TestCase imports * fix remaining imports * fix PHPUnit\Framework\TestCase imports * import GuzzleHttp\Client * fix remaining * "php_unit_method_casing" is not todo * fix "single_line_comment_spacing" * fix 2nd commit done using older fixer
32 lines
735 B
PHP
32 lines
735 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* Test class to test rcube_cache class
|
|
*/
|
|
class Framework_Cache extends 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));
|
|
}
|
|
}
|