mirror of
https://github.com/friendica/friendica
synced 2025-04-22 08:30:10 +00: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
|
@ -19,6 +19,9 @@ abstract class MemoryCacheTest extends CacheTest
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testCompareSet() {
|
||||
$this->assertNull($this->instance->get('value1'));
|
||||
|
||||
|
@ -33,6 +36,9 @@ abstract class MemoryCacheTest extends CacheTest
|
|||
$this->assertEquals($newValue, $received, 'Value not overwritten by compareSet');
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testNegativeCompareSet() {
|
||||
$this->assertNull($this->instance->get('value1'));
|
||||
|
||||
|
@ -48,6 +54,9 @@ abstract class MemoryCacheTest extends CacheTest
|
|||
$this->assertEquals($value, $received, 'Value was wrongly overwritten by any other value');
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testCompareDelete() {
|
||||
$this->assertNull($this->instance->get('value1'));
|
||||
|
||||
|
@ -59,6 +68,9 @@ abstract class MemoryCacheTest extends CacheTest
|
|||
$this->assertNull($this->instance->get('value1'), 'Value was not deleted by compareDelete');
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testNegativeCompareDelete() {
|
||||
$this->assertNull($this->instance->get('value1'));
|
||||
|
||||
|
@ -73,6 +85,9 @@ abstract class MemoryCacheTest extends CacheTest
|
|||
$this->assertNull($this->instance->get('value1'), 'Value was wrongly NOT deleted by compareDelete');
|
||||
}
|
||||
|
||||
/**
|
||||
* @small
|
||||
*/
|
||||
function testAdd() {
|
||||
$this->assertNull($this->instance->get('value1'));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue