mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-08 06:56:29 +02:00
simplifying unittests (#5395)
* simplifying unittests - use @requires instead class_exist - define @small and @medium * simplifying unittests - removed unnecessary throwings
This commit is contained in:
parent
2fa6cc0000
commit
2d0446bd38
9 changed files with 83 additions and 87 deletions
|
@ -31,6 +31,9 @@ abstract class CacheTest extends DatabaseTest
|
|||
Config::set('system', 'theme', 'system_theme');
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testSimple() {
|
||||
$this->assertNull($this->instance->get('value1'));
|
||||
|
||||
|
@ -56,6 +59,9 @@ abstract class CacheTest extends DatabaseTest
|
|||
$this->assertNull($this->instance->get('value1'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testClear() {
|
||||
$value = 'ipsum lorum';
|
||||
$this->instance->set('1_value1', $value . '1');
|
||||
|
@ -90,6 +96,9 @@ abstract class CacheTest extends DatabaseTest
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @medium
|
||||
*/
|
||||
function testTTL() {
|
||||
$this->assertNull($this->instance->get('value1'));
|
||||
|
||||
|
@ -103,6 +112,9 @@ abstract class CacheTest extends DatabaseTest
|
|||
$this->assertNull($this->instance->get('value1'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testDifferentTypesInCache() {
|
||||
// String test
|
||||
$value = "foobar";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue