From 4b8d474ec556dfa091b4d6fcc637eded7d296e8b Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 12 Sep 2016 21:02:54 +0200 Subject: [PATCH] Fix getMock Cache --- tests/lib/Files/Cache/CacheTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php index bfc3c1be7b..4a2581fbc5 100644 --- a/tests/lib/Files/Cache/CacheTest.php +++ b/tests/lib/Files/Cache/CacheTest.php @@ -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')