Fix getMock Cache

This commit is contained in:
Roeland Jago Douma 2016-09-12 21:02:54 +02:00
parent 3782edf49c
commit 4b8d474ec5
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B
1 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,7 @@ namespace Test\Files\Cache;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use OC\Files\Cache\Cache;
class LongId extends \OC\Files\Storage\Temporary {
public function getId() {
@ -500,7 +501,10 @@ class CacheTest extends \Test\TestCase {
/**
* @var \OC\Files\Cache\Cache | \PHPUnit_Framework_MockObject_MockObject $cacheMock
*/
$cacheMock = $this->getMock('\OC\Files\Cache\Cache', array('normalize'), array($this->storage), '', true);
$cacheMock = $this->getMockBuilder(Cache::class)
->setMethods(['normalize'])
->setConstructorArgs([$this->storage])
->getMock();
$cacheMock->expects($this->any())
->method('normalize')