diff options
Diffstat (limited to 'apps/files_sharing/tests/MountProviderTest.php')
-rw-r--r-- | apps/files_sharing/tests/MountProviderTest.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files_sharing/tests/MountProviderTest.php b/apps/files_sharing/tests/MountProviderTest.php index 90d9f0a8567..ea2e213ca9a 100644 --- a/apps/files_sharing/tests/MountProviderTest.php +++ b/apps/files_sharing/tests/MountProviderTest.php @@ -56,23 +56,23 @@ class MountProviderTest extends \Test\TestCase { public function setUp() { parent::setUp(); - $this->config = $this->getMock('OCP\IConfig'); - $this->user = $this->getMock('OCP\IUser'); - $this->loader = $this->getMock('OCP\Files\Storage\IStorageFactory'); - $this->shareManager = $this->getMock('\OCP\Share\IManager'); - $this->logger = $this->getMock('\OCP\ILogger'); + $this->config = $this->getMockBuilder('OCP\IConfig')->getMock(); + $this->user = $this->getMockBuilder('OCP\IUser')->getMock(); + $this->loader = $this->getMockBuilder('OCP\Files\Storage\IStorageFactory')->getMock(); + $this->shareManager = $this->getMockBuilder('\OCP\Share\IManager')->getMock(); + $this->logger = $this->getMockBuilder('\OCP\ILogger')->getMock(); $this->provider = new MountProvider($this->config, $this->shareManager, $this->logger); } public function testExcludeShares() { /** @var IShare | \PHPUnit_Framework_MockObject_MockObject $share1 */ - $share1 = $this->getMock('\OCP\Share\IShare'); + $share1 = $this->getMockBuilder('\OCP\Share\IShare')->getMock(); $share1->expects($this->once()) ->method('getPermissions') ->will($this->returnValue(0)); - $share2 = $this->getMock('\OCP\Share\IShare'); + $share2 = $this->getMockBuilder('\OCP\Share\IShare')->getMock(); $share2->expects($this->once()) ->method('getPermissions') ->will($this->returnValue(31)); @@ -83,13 +83,13 @@ class MountProviderTest extends \Test\TestCase { ->method('getTarget') ->will($this->returnValue('/share2')); - $share3 = $this->getMock('\OCP\Share\IShare'); + $share3 = $this->getMockBuilder('\OCP\Share\IShare')->getMock(); $share3->expects($this->once()) ->method('getPermissions') ->will($this->returnValue(0)); /** @var IShare | \PHPUnit_Framework_MockObject_MockObject $share4 */ - $share4 = $this->getMock('\OCP\Share\IShare'); + $share4 = $this->getMockBuilder('\OCP\Share\IShare')->getMock(); $share4->expects($this->once()) ->method('getPermissions') ->will($this->returnValue(31)); @@ -100,7 +100,7 @@ class MountProviderTest extends \Test\TestCase { ->method('getTarget') ->will($this->returnValue('/share4')); - $share5 = $this->getMock('\OCP\Share\IShare'); + $share5 = $this->getMockBuilder('\OCP\Share\IShare')->getMock(); $share5->expects($this->once()) ->method('getPermissions') ->will($this->returnValue(31)); |