Config::set('system', 'theme', 'system_theme');
}
+ /**
+ * @small
+ */
function testSimple() {
$this->assertNull($this->instance->get('value1'));
$this->assertNull($this->instance->get('value1'));
}
+ /**
+ * @small
+ */
function testClear() {
$value = 'ipsum lorum';
$this->instance->set('1_value1', $value . '1');
'3_value1' => $this->instance->get('3_value1'),
]);
+ $this->assertTrue($this->instance->clear());
+
+ $this->assertEquals([
+ '1_value1' => 'ipsum lorum1',
+ '1_value2' => 'ipsum lorum2',
+ '2_value1' => 'ipsum lorum3',
+ '3_value1' => 'ipsum lorum4',
+ ], [
+ '1_value1' => $this->instance->get('1_value1'),
+ '1_value2' => $this->instance->get('1_value2'),
+ '2_value1' => $this->instance->get('2_value1'),
+ '3_value1' => $this->instance->get('3_value1'),
+ ]);
+
$this->assertTrue($this->instance->clear(false));
$this->assertEquals([
'1_value1' => null,
'1_value2' => null,
- '2_value1' => null,
- '3_value1' => null,
+ '2_value3' => null,
+ '3_value4' => null,
], [
'1_value1' => $this->instance->get('1_value1'),
'1_value2' => $this->instance->get('1_value2'),
- '2_value1' => $this->instance->get('2_value1'),
- '3_value1' => $this->instance->get('3_value1'),
+ '2_value3' => $this->instance->get('2_value3'),
+ '3_value4' => $this->instance->get('3_value4'),
]);
}
+ /**
+ * @medium
+ */
function testTTL() {
$this->assertNull($this->instance->get('value1'));
$this->assertNull($this->instance->get('value1'));
}
+ /**
+ * @small
+ */
function testDifferentTypesInCache() {
// String test
$value = "foobar";