Bug #20474 ยป test_11147.diff
tests/t3lib/cache/frontend/t3lib_cache_frontend_variablefrontendtestcase.php (working copy) | ||
---|---|---|
/**
|
||
* @test
|
||
* @author Bernhard Kraft <bernhard@typo3.org>
|
||
* @author Ingo Renner <ingo@typo3.org>
|
||
*/
|
||
public function setTestsAllParameters() {
|
||
$theIdentifier = 'ParameterCacheTest';
|
||
$theString = 'Just some value';
|
||
$theTags = array('tagTest1', 'tagTest2');
|
||
$theLifetime = 1234567;
|
||
$backend = $this->getMock('t3lib_cache_backend_AbstractBackend', array('get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'findIdentifiersByTags', 'flush', 'flushByTag', 'flushByTags', 'collectGarbage'), array(), '', FALSE);
|
||
$backend->expects($this->once())->method('set')->with($this->equalTo($theIdentifier), $this->equalTo(serialize($theString)), $this->equalTo($theTags), $this->equalTo($theLifetime));
|
||
$cache = new t3lib_cache_frontend_VariableFrontend('VariableFrontend', $backend);
|
||
$cache->set($theIdentifier, $theString, $theTags, $theLifetime);
|
||
}
|
||
/**
|
||
* @test
|
||
* @author Robert Lemke <robert@typo3.org>
|
||
* @author Ingo Renner <ingo@typo3.org>
|
||
*/
|
tests/t3lib/cache/frontend/t3lib_cache_frontend_stringfrontendtestcase.php (working copy) | ||
---|---|---|
/**
|
||
* @test
|
||
* @author Bernhard Kraft <bernhard@typo3.org>
|
||
* @author Ingo Renner <ingo@typo3.org>
|
||
*/
|
||
public function setTestsAllParameters() {
|
||
$theIdentifier = 'ParameterCacheTest';
|
||
$theString = 'Just some value';
|
||
$theTags = array('tagTest1', 'tagTest2');
|
||
$theLifetime = 1234567;
|
||
$backend = $this->getMock('t3lib_cache_backend_AbstractBackend', array('get', 'set', 'has', 'remove', 'findIdentifiersByTag', 'findIdentifiersByTags', 'flush', 'flushByTag', 'flushByTags', 'collectGarbage'), array(), '', FALSE);
|
||
$backend->expects($this->once())->method('set')->with($this->equalTo($theIdentifier), $this->equalTo($theString), $this->equalTo($theTags), $this->equalTo($theLifetime));
|
||
$cache = new t3lib_cache_frontend_StringFrontend('StringFrontend', $backend);
|
||
$cache->set($theIdentifier, $theString, $theTags, $theLifetime);
|
||
}
|
||
/**
|
||
* @test
|
||
* @author Karsten Dambekalns <karsten@typo3.org>
|
||
* @author Ingo Renner <ingo@typo3.org>
|
||
* @expectedException t3lib_cache_exception_InvalidData
|