[Cache] fix return type declarations
This commit is contained in:
parent
5072cfc7f8
commit
5f9aaa743c
|
@ -90,7 +90,7 @@ class DoctrineProvider extends CacheProvider implements PruneableInterface, Rese
|
||||||
*/
|
*/
|
||||||
protected function doFlush()
|
protected function doFlush()
|
||||||
{
|
{
|
||||||
$this->pool->clear();
|
return $this->pool->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,5 +98,6 @@ class DoctrineProvider extends CacheProvider implements PruneableInterface, Rese
|
||||||
*/
|
*/
|
||||||
protected function doGetStats()
|
protected function doGetStats()
|
||||||
{
|
{
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,10 @@ class MaxIdLengthAdapterTest extends TestCase
|
||||||
->setConstructorArgs([str_repeat('-', 26)])
|
->setConstructorArgs([str_repeat('-', 26)])
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
|
$cache
|
||||||
|
->method('doFetch')
|
||||||
|
->willReturn(['2:']);
|
||||||
|
|
||||||
$reflectionClass = new \ReflectionClass(AbstractAdapter::class);
|
$reflectionClass = new \ReflectionClass(AbstractAdapter::class);
|
||||||
|
|
||||||
$reflectionMethod = $reflectionClass->getMethod('getId');
|
$reflectionMethod = $reflectionClass->getMethod('getId');
|
||||||
|
@ -56,7 +60,7 @@ class MaxIdLengthAdapterTest extends TestCase
|
||||||
$reflectionProperty->setValue($cache, true);
|
$reflectionProperty->setValue($cache, true);
|
||||||
|
|
||||||
// Versioning enabled
|
// Versioning enabled
|
||||||
$this->assertEquals('--------------------------:1:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]));
|
$this->assertEquals('--------------------------:2:------------', $reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)]));
|
||||||
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])));
|
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 12)])));
|
||||||
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)])));
|
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 23)])));
|
||||||
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)])));
|
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)])));
|
||||||
|
|
Reference in New Issue