summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-10-26 13:46:16 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-10-26 13:56:56 +0200
commitc733cdaa65ea473b848fb8329674145f54c1277b (patch)
treefa1bebe361ee81a1c3e8ead10263af65610f6d97 /apps/files_sharing/tests
parent06f46bd25614c080b75558e8372124142906d977 (diff)
downloadnextcloud-server-c733cdaa65ea473b848fb8329674145f54c1277b.tar.gz
nextcloud-server-c733cdaa65ea473b848fb8329674145f54c1277b.zip
Use ::class in test mocks of encryption app
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_sharing/tests')
-rw-r--r--apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php6
-rw-r--r--apps/files_sharing/tests/Controller/ShareAPIControllerTest.php30
2 files changed, 19 insertions, 17 deletions
diff --git a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php
index 827fcc15797..5480874615e 100644
--- a/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php
+++ b/apps/files_sharing/tests/Command/CleanupRemoteStoragesTest.php
@@ -22,6 +22,8 @@
namespace OCA\Files_Sharing\Tests\Command;
use OCA\Files_Sharing\Command\CleanupRemoteStorages;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
use Test\TestCase;
/**
@@ -158,10 +160,10 @@ class CleanupRemoteStoragesTest extends TestCase {
* Test cleanup of orphaned storages
*/
public function testCleanup() {
- $input = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')
+ $input = $this->getMockBuilder(InputInterface::class)
->disableOriginalConstructor()
->getMock();
- $output = $this->getMockBuilder('Symfony\Component\Console\Output\OutputInterface')
+ $output = $this->getMockBuilder(OutputInterface::class)
->disableOriginalConstructor()
->getMock();
diff --git a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
index e73ebb62c6a..3bebb9e1195 100644
--- a/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
+++ b/apps/files_sharing/tests/Controller/ShareAPIControllerTest.php
@@ -264,7 +264,7 @@ class ShareAPIControllerTest extends TestCase {
->getMock();
$cache->method('getNumericStorageId')->willReturn(101);
- $storage = $this->getMockBuilder('OC\Files\Storage\Storage')
+ $storage = $this->getMockBuilder(Storage::class)
->disableOriginalConstructor()
->getMock();
$storage->method('getId')->willReturn('STORAGE');
@@ -637,7 +637,7 @@ class ShareAPIControllerTest extends TestCase {
->willReturn($userFolder);
$path = $this->getMockBuilder(File::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -669,7 +669,7 @@ class ShareAPIControllerTest extends TestCase {
->willReturn($userFolder);
$path = $this->getMockBuilder(File::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -714,7 +714,7 @@ class ShareAPIControllerTest extends TestCase {
->willReturn($userFolder);
$path = $this->getMockBuilder(File::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -768,7 +768,7 @@ class ShareAPIControllerTest extends TestCase {
->willReturn($userFolder);
$path = $this->getMockBuilder(File::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -820,7 +820,7 @@ class ShareAPIControllerTest extends TestCase {
->willReturn($userFolder);
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -872,7 +872,7 @@ class ShareAPIControllerTest extends TestCase {
->willReturn($userFolder);
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -904,7 +904,7 @@ class ShareAPIControllerTest extends TestCase {
]));
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -923,7 +923,7 @@ class ShareAPIControllerTest extends TestCase {
*/
public function testCreateShareLinkNoPublicUpload() {
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -943,7 +943,7 @@ class ShareAPIControllerTest extends TestCase {
*/
public function testCreateShareLinkPublicUploadFile() {
$path = $this->getMockBuilder(File::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -962,7 +962,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -996,7 +996,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -1040,7 +1040,7 @@ class ShareAPIControllerTest extends TestCase {
]));
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -1081,7 +1081,7 @@ class ShareAPIControllerTest extends TestCase {
$ocs = $this->mockFormatShare();
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(false);
@@ -1126,7 +1126,7 @@ class ShareAPIControllerTest extends TestCase {
->willReturn($userFolder);
$path = $this->getMockBuilder(Folder::class)->getMock();
- $storage = $this->getMockBuilder('OCP\Files\Storage')->getMock();
+ $storage = $this->getMockBuilder(Storage::class)->getMock();
$storage->method('instanceOfStorage')
->with('OCA\Files_Sharing\External\Storage')
->willReturn(true);