diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Settings/Controller/GroupsControllerTest.php | 5 | ||||
-rw-r--r-- | tests/lib/Encryption/UpdateTest.php | 3 | ||||
-rw-r--r-- | tests/lib/FileChunkingTest.php | 2 | ||||
-rw-r--r-- | tests/lib/Files/Node/FolderTest.php | 6 | ||||
-rw-r--r-- | tests/lib/Files/Node/NodeTest.php | 3 | ||||
-rw-r--r-- | tests/lib/Files/Node/RootTest.php | 2 | ||||
-rw-r--r-- | tests/lib/Files/ViewTest.php | 4 |
7 files changed, 14 insertions, 11 deletions
diff --git a/tests/Settings/Controller/GroupsControllerTest.php b/tests/Settings/Controller/GroupsControllerTest.php index 78df5f3a3cb..ecbfa9ea05e 100644 --- a/tests/Settings/Controller/GroupsControllerTest.php +++ b/tests/Settings/Controller/GroupsControllerTest.php @@ -13,6 +13,7 @@ namespace Tests\Settings\Controller; use OC\Group\Group; use OC\Group\MetaData; use OC\Settings\Controller\GroupsController; +use OC\User\User; use OCP\AppFramework\Http; use OCP\AppFramework\Http\DataResponse; use OCP\IGroupManager; @@ -99,7 +100,7 @@ class GroupsControllerTest extends \Test\TestCase { $groups[] = $thirdGroup; $groups[] = $fourthGroup; - $user = $this->getMockBuilder('\OC\User\User') + $user = $this->getMockBuilder(User::class) ->disableOriginalConstructor()->getMock(); $this->userSession ->expects($this->once()) @@ -191,7 +192,7 @@ class GroupsControllerTest extends \Test\TestCase { $groups[] = $thirdGroup; $groups[] = $fourthGroup; - $user = $this->getMockBuilder('\OC\User\User') + $user = $this->getMockBuilder(User::class) ->disableOriginalConstructor()->getMock(); $this->userSession ->expects($this->once()) diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php index ccd2bb796fc..a8cbef70d75 100644 --- a/tests/lib/Encryption/UpdateTest.php +++ b/tests/lib/Encryption/UpdateTest.php @@ -24,6 +24,7 @@ namespace Test\Encryption; use OC\Encryption\Update; +use OC\Files\Mount\Manager; use OC\Files\View; use Test\TestCase; @@ -60,7 +61,7 @@ class UpdateTest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->util = $this->getMockBuilder('\OC\Encryption\Util') ->disableOriginalConstructor()->getMock(); - $this->mountManager = $this->getMockBuilder('\OC\Files\Mount\Manager') + $this->mountManager = $this->getMockBuilder(Manager::class) ->disableOriginalConstructor()->getMock(); $this->encryptionManager = $this->getMockBuilder('\OC\Encryption\Manager') ->disableOriginalConstructor()->getMock(); diff --git a/tests/lib/FileChunkingTest.php b/tests/lib/FileChunkingTest.php index cf0fed251a4..42fc820c5d0 100644 --- a/tests/lib/FileChunkingTest.php +++ b/tests/lib/FileChunkingTest.php @@ -47,7 +47,7 @@ class FileChunkingTest extends \Test\TestCase { * @param $expected */ public function testIsComplete($total, array $present, $expected) { - $fileChunking = $this->getMockBuilder('\OC_FileChunking') + $fileChunking = $this->getMockBuilder(\OC_FileChunking::class) ->setMethods(['getCache']) ->setConstructorArgs([[ 'name' => 'file', diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php index ec043c7b81e..6479dad58d3 100644 --- a/tests/lib/Files/Node/FolderTest.php +++ b/tests/lib/Files/Node/FolderTest.php @@ -786,7 +786,7 @@ class FolderTest extends NodeTest { ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */ - $folderInfo = $this->getMockBuilder('\OC\Files\FileInfo') + $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); $baseTime = 1000; @@ -847,7 +847,7 @@ class FolderTest extends NodeTest { ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */ - $folderInfo = $this->getMockBuilder('\OC\Files\FileInfo') + $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); $baseTime = 1000; @@ -906,7 +906,7 @@ class FolderTest extends NodeTest { ->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager]) ->getMock(); /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */ - $folderInfo = $this->getMockBuilder('\OC\Files\FileInfo') + $folderInfo = $this->getMockBuilder(FileInfo::class) ->disableOriginalConstructor()->getMock(); $baseTime = 1000; diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php index 160787411f1..9200ae69f75 100644 --- a/tests/lib/Files/Node/NodeTest.php +++ b/tests/lib/Files/Node/NodeTest.php @@ -9,6 +9,7 @@ namespace Test\Files\Node; use OC\Files\FileInfo; +use OC\Files\Mount\Manager; use OC\Files\View; use OCP\Files\Config\IUserMountCache; use OCP\Files\IRootFolder; @@ -52,7 +53,7 @@ abstract class NodeTest extends \Test\TestCase { ->disableOriginalConstructor() ->getMock(); $this->user = new \OC\User\User('', new \Test\Util\User\Dummy, null, $config, $urlGenerator); - $this->manager = $this->getMockBuilder('\OC\Files\Mount\Manager') + $this->manager = $this->getMockBuilder(Manager::class) ->disableOriginalConstructor() ->getMock(); $this->view = $this->getMockBuilder(View::class) diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php index 2f81a96d486..fd050c8d90c 100644 --- a/tests/lib/Files/Node/RootTest.php +++ b/tests/lib/Files/Node/RootTest.php @@ -47,7 +47,7 @@ class RootTest extends \Test\TestCase { ->getMock(); $this->user = new \OC\User\User('', new \Test\Util\User\Dummy, null, $config, $urlgenerator); - $this->manager = $this->getMockBuilder('\OC\Files\Mount\Manager') + $this->manager = $this->getMockBuilder(Manager::class) ->disableOriginalConstructor() ->getMock(); $this->userMountCache = $this->getMockBuilder('\OCP\Files\Config\IUserMountCache') diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index cab8bd62739..33d5cc0a8a6 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -2350,7 +2350,7 @@ class ViewTest extends \Test\TestCase { return; } - $eventHandler = $this->getMockBuilder('\stdclass') + $eventHandler = $this->getMockBuilder(\stdclass::class) ->setMethods(['preCallback', 'postCallback']) ->getMock(); @@ -2425,7 +2425,7 @@ class ViewTest extends \Test\TestCase { Filesystem::getMountManager()->addMount($mount); // Listen for events - $eventHandler = $this->getMockBuilder('\stdclass') + $eventHandler = $this->getMockBuilder(\stdclass::class) ->setMethods(['umount', 'post_umount']) ->getMock(); $eventHandler->expects($this->once()) |