[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()
|
||||
{
|
||||
$this->pool->clear();
|
||||
return $this->pool->clear();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,5 +98,6 @@ class DoctrineProvider extends CacheProvider implements PruneableInterface, Rese
|
|||
*/
|
||||
protected function doGetStats()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,10 @@ class MaxIdLengthAdapterTest extends TestCase
|
|||
->setConstructorArgs([str_repeat('-', 26)])
|
||||
->getMock();
|
||||
|
||||
$cache
|
||||
->method('doFetch')
|
||||
->willReturn(['2:']);
|
||||
|
||||
$reflectionClass = new \ReflectionClass(AbstractAdapter::class);
|
||||
|
||||
$reflectionMethod = $reflectionClass->getMethod('getId');
|
||||
|
@ -56,7 +60,7 @@ class MaxIdLengthAdapterTest extends TestCase
|
|||
$reflectionProperty->setValue($cache, true);
|
||||
|
||||
// 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('-', 23)])));
|
||||
$this->assertLessThanOrEqual(50, \strlen($reflectionMethod->invokeArgs($cache, [str_repeat('-', 40)])));
|
||||
|
|
Reference in New Issue