aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-08-11 21:32:18 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-08-12 13:55:19 +0200
commit234b510652d117bb3ef9ef3b6315db3a2c2eb91b (patch)
tree880cec2bf4fe4846eff9fa5aa68d2671fb0495be /tests/lib/Files
parent138f47a1b980aaceb116b256b8ccf14f523e7e67 (diff)
downloadnextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.tar.gz
nextcloud-server-234b510652d117bb3ef9ef3b6315db3a2c2eb91b.zip
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/lib/Files')
-rw-r--r--tests/lib/Files/AppData/AppDataTest.php4
-rw-r--r--tests/lib/Files/AppData/FactoryTest.php4
-rw-r--r--tests/lib/Files/Cache/CacheTest.php2
-rw-r--r--tests/lib/Files/Cache/QuerySearchHelperTest.php2
-rw-r--r--tests/lib/Files/Mount/ObjectHomeMountProviderTest.php8
-rw-r--r--tests/lib/Files/Node/FileTest.php20
-rw-r--r--tests/lib/Files/Node/FolderTest.php60
-rw-r--r--tests/lib/Files/Node/NodeTest.php44
-rw-r--r--tests/lib/Files/Node/RootTest.php24
-rw-r--r--tests/lib/Files/SimpleFS/SimpleFileTest.php2
-rw-r--r--tests/lib/Files/Storage/Wrapper/EncryptionTest.php34
-rw-r--r--tests/lib/Files/Stream/EncryptionTest.php4
-rw-r--r--tests/lib/Files/ViewTest.php26
13 files changed, 117 insertions, 117 deletions
diff --git a/tests/lib/Files/AppData/AppDataTest.php b/tests/lib/Files/AppData/AppDataTest.php
index a03be9e45e9..d06d7a9a91e 100644
--- a/tests/lib/Files/AppData/AppDataTest.php
+++ b/tests/lib/Files/AppData/AppDataTest.php
@@ -33,10 +33,10 @@ use OCP\Files\Node;
use OCP\Files\SimpleFS\ISimpleFolder;
class AppDataTest extends \Test\TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
private $systemConfig;
/** @var IAppData */
diff --git a/tests/lib/Files/AppData/FactoryTest.php b/tests/lib/Files/AppData/FactoryTest.php
index fec464d6e3a..8161bc515ec 100644
--- a/tests/lib/Files/AppData/FactoryTest.php
+++ b/tests/lib/Files/AppData/FactoryTest.php
@@ -28,10 +28,10 @@ use OC\SystemConfig;
use OCP\Files\IRootFolder;
class FactoryTest extends \Test\TestCase {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject */
private $rootFolder;
- /** @var SystemConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var SystemConfig|\PHPUnit\Framework\MockObject\MockObject */
private $systemConfig;
/** @var Factory */
diff --git a/tests/lib/Files/Cache/CacheTest.php b/tests/lib/Files/Cache/CacheTest.php
index 97663c16c02..a6d429798e8 100644
--- a/tests/lib/Files/Cache/CacheTest.php
+++ b/tests/lib/Files/Cache/CacheTest.php
@@ -532,7 +532,7 @@ class CacheTest extends \Test\TestCase {
$folderWith0308 = "\x53\x63\x68\x6f\xcc\x88\x6e";
/**
- * @var \OC\Files\Cache\Cache | \PHPUnit_Framework_MockObject_MockObject $cacheMock
+ * @var \OC\Files\Cache\Cache | \PHPUnit\Framework\MockObject\MockObject $cacheMock
*/
$cacheMock = $this->getMockBuilder(Cache::class)
->setMethods(['normalize'])
diff --git a/tests/lib/Files/Cache/QuerySearchHelperTest.php b/tests/lib/Files/Cache/QuerySearchHelperTest.php
index 464561681d0..8f97e0158fe 100644
--- a/tests/lib/Files/Cache/QuerySearchHelperTest.php
+++ b/tests/lib/Files/Cache/QuerySearchHelperTest.php
@@ -39,7 +39,7 @@ class QuerySearchHelperTest extends TestCase {
/** @var IQueryBuilder */
private $builder;
- /** @var IMimeTypeLoader|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IMimeTypeLoader|\PHPUnit\Framework\MockObject\MockObject */
private $mimetypeLoader;
/** @var QuerySearchHelper */
diff --git a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php
index 278872b8728..ea414679888 100644
--- a/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php
+++ b/tests/lib/Files/Mount/ObjectHomeMountProviderTest.php
@@ -12,13 +12,13 @@ class ObjectHomeMountProviderTest extends \Test\TestCase {
/** @var ObjectHomeMountProvider */
protected $provider;
- /** @var IConfig|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IConfig|\PHPUnit\Framework\MockObject\MockObject */
protected $config;
- /** @var IUser|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUser|\PHPUnit\Framework\MockObject\MockObject */
protected $user;
- /** @var IStorageFactory|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IStorageFactory|\PHPUnit\Framework\MockObject\MockObject */
protected $loader;
protected function setUp(): void {
@@ -216,7 +216,7 @@ class ObjectHomeMountProviderTest extends \Test\TestCase {
$this->user->method('getUID')
->willReturn('uid');
$this->loader->expects($this->never())->method($this->anything());
-
+
$mount = $this->provider->getHomeMountForUser($this->user, $this->loader);
$this->assertInstanceOf('OC\Files\Mount\MountPoint', $mount);
}
diff --git a/tests/lib/Files/Node/FileTest.php b/tests/lib/Files/Node/FileTest.php
index 3fa988c89d8..6b5aaabbc28 100644
--- a/tests/lib/Files/Node/FileTest.php
+++ b/tests/lib/Files/Node/FileTest.php
@@ -33,7 +33,7 @@ class FileTest extends NodeTest {
}
public function testGetContent() {
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
@@ -59,11 +59,11 @@ class FileTest extends NodeTest {
$this->assertEquals('bar', $node->getContent());
}
-
+
public function testGetContentNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
@@ -82,7 +82,7 @@ class FileTest extends NodeTest {
}
public function testPutContent() {
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
@@ -105,11 +105,11 @@ class FileTest extends NodeTest {
$node->putContent('bar');
}
-
+
public function testPutContentNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
@@ -124,7 +124,7 @@ class FileTest extends NodeTest {
}
public function testGetMimeType() {
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
@@ -213,7 +213,7 @@ class FileTest extends NodeTest {
$this->assertEquals(2, $hooksCalled);
}
-
+
public function testFOpenReadNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -238,7 +238,7 @@ class FileTest extends NodeTest {
$node->fopen('r');
}
-
+
public function testFOpenReadWriteNoReadPermissions() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -263,7 +263,7 @@ class FileTest extends NodeTest {
$node->fopen('w');
}
-
+
public function testFOpenReadWriteNoWritePermissions() {
$this->expectException(\OCP\Files\NotPermittedException::class);
diff --git a/tests/lib/Files/Node/FolderTest.php b/tests/lib/Files/Node/FolderTest.php
index d2bbf65965a..1ba052b8de4 100644
--- a/tests/lib/Files/Node/FolderTest.php
+++ b/tests/lib/Files/Node/FolderTest.php
@@ -50,7 +50,7 @@ class FolderTest extends NodeTest {
public function testGetDirectoryContent() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -82,7 +82,7 @@ class FolderTest extends NodeTest {
public function testGet() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -103,7 +103,7 @@ class FolderTest extends NodeTest {
public function testNodeExists() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -127,7 +127,7 @@ class FolderTest extends NodeTest {
public function testNodeExistsNotExists() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -149,7 +149,7 @@ class FolderTest extends NodeTest {
public function testNewFolder() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -175,13 +175,13 @@ class FolderTest extends NodeTest {
$this->assertEquals($child, $result);
}
-
+
public function testNewFolderNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -203,7 +203,7 @@ class FolderTest extends NodeTest {
public function testNewFile() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -229,13 +229,13 @@ class FolderTest extends NodeTest {
$this->assertEquals($child, $result);
}
-
+
public function testNewFileNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -257,7 +257,7 @@ class FolderTest extends NodeTest {
public function testGetFreeSpace() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -279,7 +279,7 @@ class FolderTest extends NodeTest {
public function testSearch() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -330,7 +330,7 @@ class FolderTest extends NodeTest {
public function testSearchInRoot() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -340,7 +340,7 @@ class FolderTest extends NodeTest {
$root->expects($this->any())
->method('getUser')
->willReturn($this->user);
- /** @var \PHPUnit_Framework_MockObject_MockObject|Storage $storage */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|Storage $storage */
$storage = $this->createMock(Storage::class);
$storage->method('getId')->willReturn('');
$cache = $this->getMockBuilder(Cache::class)->setConstructorArgs([$storage])->getMock();
@@ -383,7 +383,7 @@ class FolderTest extends NodeTest {
public function testSearchInStorageRoot() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -434,7 +434,7 @@ class FolderTest extends NodeTest {
public function testSearchSubStorages() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -517,7 +517,7 @@ class FolderTest extends NodeTest {
public function testGetById() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -571,7 +571,7 @@ class FolderTest extends NodeTest {
public function testGetByIdMountRoot() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -620,7 +620,7 @@ class FolderTest extends NodeTest {
public function testGetByIdOutsideFolder() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -673,7 +673,7 @@ class FolderTest extends NodeTest {
public function testGetByIdMultipleStorages() {
$manager = $this->createMock(Manager::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -756,7 +756,7 @@ class FolderTest extends NodeTest {
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
$root = $this->getMockBuilder(Root::class)
@@ -783,15 +783,15 @@ class FolderTest extends NodeTest {
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */
$root = $this->getMockBuilder(Root::class)
->setMethods(['getUser', 'getMountsIn', 'getMount'])
->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */
$folderInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
@@ -847,15 +847,15 @@ class FolderTest extends NodeTest {
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */
$root = $this->getMockBuilder(Root::class)
->setMethods(['getUser', 'getMountsIn', 'getMount'])
->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */
$folderInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
@@ -909,15 +909,15 @@ class FolderTest extends NodeTest {
$manager = $this->createMock(Manager::class);
$folderPath = '/bar/foo';
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->createMock(View::class);
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\Node\Root $root */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\Node\Root $root */
$root = $this->getMockBuilder(Root::class)
->setMethods(['getUser', 'getMountsIn', 'getMount'])
->setConstructorArgs([$manager, $view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->getMock();
- /** @var \PHPUnit_Framework_MockObject_MockObject|\OC\Files\FileInfo $folderInfo */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|\OC\Files\FileInfo $folderInfo */
$folderInfo = $this->getMockBuilder(FileInfo::class)
->disableOriginalConstructor()->getMock();
diff --git a/tests/lib/Files/Node/NodeTest.php b/tests/lib/Files/Node/NodeTest.php
index 86643617959..6ea5a6d7ffa 100644
--- a/tests/lib/Files/Node/NodeTest.php
+++ b/tests/lib/Files/Node/NodeTest.php
@@ -29,15 +29,15 @@ abstract class NodeTest extends \Test\TestCase {
protected $user;
/** @var \OC\Files\Mount\Manager */
protected $manager;
- /** @var \OC\Files\View|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\View|\PHPUnit\Framework\MockObject\MockObject */
protected $view;
- /** @var \OC\Files\Node\Root|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Files\Node\Root|\PHPUnit\Framework\MockObject\MockObject */
protected $root;
- /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */
protected $userMountCache;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
protected $logger;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
protected $userManager;
protected function setUp(): void {
@@ -177,7 +177,7 @@ abstract class NodeTest extends \Test\TestCase {
$this->assertEquals(2, $hooksRun);
}
-
+
public function testDeleteNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -307,7 +307,7 @@ abstract class NodeTest extends \Test\TestCase {
->method('getUser')
->willReturn($this->user);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
->disableOriginalConstructor()
@@ -337,7 +337,7 @@ abstract class NodeTest extends \Test\TestCase {
->method('getUser')
->willReturn($this->user);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->getMockBuilder('\OC\Files\Storage\Storage')
->disableOriginalConstructor()
@@ -434,7 +434,7 @@ abstract class NodeTest extends \Test\TestCase {
$this->assertEquals(2, $hooksRun);
}
-
+
public function testTouchNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -451,7 +451,7 @@ abstract class NodeTest extends \Test\TestCase {
$node->touch(100);
}
-
+
public function testInvalidPath() {
$this->expectException(\OCP\Files\InvalidPathException::class);
@@ -485,12 +485,12 @@ abstract class NodeTest extends \Test\TestCase {
$this->assertEquals(3, $target->getId());
}
-
+
public function testCopyNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->createMock('\OC\Files\Storage\Storage');
@@ -516,7 +516,7 @@ abstract class NodeTest extends \Test\TestCase {
$node->copy('/bar/asd');
}
-
+
public function testCopyNoParent() {
$this->expectException(\OCP\Files\NotFoundException::class);
@@ -533,7 +533,7 @@ abstract class NodeTest extends \Test\TestCase {
$node->copy('/bar/asd/foo');
}
-
+
public function testCopyParentIsFile() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -590,7 +590,7 @@ abstract class NodeTest extends \Test\TestCase {
* @param string $postHookName
*/
public function testMoveCopyHooks($operationMethod, $viewMethod, $preHookName, $postHookName) {
- /** @var IRootFolder|\PHPUnit_Framework_MockObject_MockObject $root */
+ /** @var IRootFolder|\PHPUnit\Framework\MockObject\MockObject $root */
$root = $this->getMockBuilder('\OC\Files\Node\Root')
->setConstructorArgs([$this->manager, $this->view, $this->user, $this->userMountCache, $this->logger, $this->userManager])
->setMethods(['get'])
@@ -606,7 +606,7 @@ abstract class NodeTest extends \Test\TestCase {
->willReturn($this->getFileInfo(['permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1]));
/**
- * @var \OC\Files\Node\File|\PHPUnit_Framework_MockObject_MockObject $node
+ * @var \OC\Files\Node\File|\PHPUnit\Framework\MockObject\MockObject $node
*/
$node = $this->createTestNode($root, $this->view, '/bar/foo');
$parentNode = new \OC\Files\Node\Folder($root, $this->view, '/bar');
@@ -656,7 +656,7 @@ abstract class NodeTest extends \Test\TestCase {
$this->assertEquals(4, $hooksRun);
}
-
+
public function testMoveNotPermitted() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -678,12 +678,12 @@ abstract class NodeTest extends \Test\TestCase {
$node->move('/bar/asd');
}
-
+
public function testMoveNoParent() {
$this->expectException(\OCP\Files\NotFoundException::class);
/**
- * @var \OC\Files\Storage\Storage | \PHPUnit_Framework_MockObject_MockObject $storage
+ * @var \OC\Files\Storage\Storage | \PHPUnit\Framework\MockObject\MockObject $storage
*/
$storage = $this->createMock('\OC\Files\Storage\Storage');
@@ -700,7 +700,7 @@ abstract class NodeTest extends \Test\TestCase {
$node->move('/bar/asd');
}
-
+
public function testMoveParentIsFile() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -718,7 +718,7 @@ abstract class NodeTest extends \Test\TestCase {
$node->move('/bar/asd');
}
-
+
public function testMoveFailed() {
$this->expectException(\OCP\Files\NotPermittedException::class);
@@ -741,7 +741,7 @@ abstract class NodeTest extends \Test\TestCase {
$node->move('/bar/asd');
}
-
+
public function testCopyFailed() {
$this->expectException(\OCP\Files\NotPermittedException::class);
diff --git a/tests/lib/Files/Node/RootTest.php b/tests/lib/Files/Node/RootTest.php
index 6c006d1cf62..13fdcb65902 100644
--- a/tests/lib/Files/Node/RootTest.php
+++ b/tests/lib/Files/Node/RootTest.php
@@ -27,11 +27,11 @@ class RootTest extends \Test\TestCase {
private $user;
/** @var \OC\Files\Mount\Manager */
private $manager;
- /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Files\Config\IUserMountCache|\PHPUnit\Framework\MockObject\MockObject */
private $userMountCache;
- /** @var ILogger|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */
private $logger;
- /** @var IUserManager|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var IUserManager|\PHPUnit\Framework\MockObject\MockObject */
private $userManager;
protected function setUp(): void {
@@ -60,7 +60,7 @@ class RootTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
@@ -85,7 +85,7 @@ class RootTest extends \Test\TestCase {
$this->assertInstanceOf('\OC\Files\Node\File', $node);
}
-
+
public function testGetNotFound() {
$this->expectException(\OCP\Files\NotFoundException::class);
@@ -96,7 +96,7 @@ class RootTest extends \Test\TestCase {
->disableOriginalConstructor()
->getMock();
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
@@ -119,12 +119,12 @@ class RootTest extends \Test\TestCase {
$root->get('/bar/foo');
}
-
+
public function testGetInvalidPath() {
$this->expectException(\OCP\Files\NotPermittedException::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
@@ -141,12 +141,12 @@ class RootTest extends \Test\TestCase {
$root->get('/../foo');
}
-
+
public function testGetNoStorages() {
$this->expectException(\OCP\Files\NotFoundException::class);
/**
- * @var \OC\Files\View | \PHPUnit_Framework_MockObject_MockObject $view
+ * @var \OC\Files\View | \PHPUnit\Framework\MockObject\MockObject $view
*/
$view = $this->getMockBuilder(View::class)
->disableOriginalConstructor()
@@ -182,7 +182,7 @@ class RootTest extends \Test\TestCase {
->method('get')
->with('MyUserId')
->willReturn($user);
- /** @var CappedMemoryCache|\PHPUnit_Framework_MockObject_MockObject $cappedMemoryCache */
+ /** @var CappedMemoryCache|\PHPUnit\Framework\MockObject\MockObject $cappedMemoryCache */
$cappedMemoryCache = $this->createMock(CappedMemoryCache::class);
$cappedMemoryCache
->expects($this->once())
@@ -199,7 +199,7 @@ class RootTest extends \Test\TestCase {
$this->assertEquals($folder, $root->getUserFolder('MyUserId'));
}
-
+
public function testGetUserFolderWithNoUserObj() {
$this->expectException(\OC\User\NoUserException::class);
$this->expectExceptionMessage('Backends provided no user object');
diff --git a/tests/lib/Files/SimpleFS/SimpleFileTest.php b/tests/lib/Files/SimpleFS/SimpleFileTest.php
index b9a47c4d6e2..def570edf99 100644
--- a/tests/lib/Files/SimpleFS/SimpleFileTest.php
+++ b/tests/lib/Files/SimpleFS/SimpleFileTest.php
@@ -29,7 +29,7 @@ use OCP\Files\Folder;
use OCP\Files\NotFoundException;
class SimpleFileTest extends \Test\TestCase {
- /** @var File|\PHPUnit_Framework_MockObject_MockObject */
+ /** @var File|\PHPUnit\Framework\MockObject\MockObject */
private $file;
/** @var SimpleFile */
diff --git a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
index 73de60e3652..eccec7c28d5 100644
--- a/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
+++ b/tests/lib/Files/Storage/Wrapper/EncryptionTest.php
@@ -37,72 +37,72 @@ class EncryptionTest extends Storage {
private $sourceStorage;
/**
- * @var \OC\Files\Storage\Wrapper\Encryption | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Storage\Wrapper\Encryption | \PHPUnit\Framework\MockObject\MockObject
*/
protected $instance;
/**
- * @var \OC\Encryption\Keys\Storage | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Keys\Storage | \PHPUnit\Framework\MockObject\MockObject
*/
private $keyStore;
/**
- * @var \OC\Encryption\Util | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Util | \PHPUnit\Framework\MockObject\MockObject
*/
private $util;
/**
- * @var \OC\Encryption\Manager | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Manager | \PHPUnit\Framework\MockObject\MockObject
*/
private $encryptionManager;
/**
- * @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject
*/
private $encryptionModule;
/**
- * @var \OC\Encryption\Update | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\Update | \PHPUnit\Framework\MockObject\MockObject
*/
private $update;
/**
- * @var \OC\Files\Cache\Cache | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Cache\Cache | \PHPUnit\Framework\MockObject\MockObject
*/
private $cache;
/**
- * @var \OC\Log | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Log | \PHPUnit\Framework\MockObject\MockObject
*/
private $logger;
/**
- * @var \OC\Encryption\File | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Encryption\File | \PHPUnit\Framework\MockObject\MockObject
*/
private $file;
/**
- * @var \OC\Files\Mount\MountPoint | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Mount\MountPoint | \PHPUnit\Framework\MockObject\MockObject
*/
private $mount;
/**
- * @var \OC\Files\Mount\Manager | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Files\Mount\Manager | \PHPUnit\Framework\MockObject\MockObject
*/
private $mountManager;
/**
- * @var \OC\Group\Manager | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OC\Group\Manager | \PHPUnit\Framework\MockObject\MockObject
*/
private $groupManager;
/**
- * @var \OCP\IConfig | \PHPUnit_Framework_MockObject_MockObject
+ * @var \OCP\IConfig | \PHPUnit\Framework\MockObject\MockObject
*/
private $config;
- /** @var \OC\Memcache\ArrayCache | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OC\Memcache\ArrayCache | \PHPUnit\Framework\MockObject\MockObject */
private $arrayCache;
@@ -212,7 +212,7 @@ class EncryptionTest extends Storage {
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
protected function buildMockModule() {
$this->encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
@@ -848,7 +848,7 @@ class EncryptionTest extends Storage {
$mountPoint = '/mountPoint';
- /** @var \OC\Files\Storage\Wrapper\Encryption |\PHPUnit_Framework_MockObject_MockObject $instance */
+ /** @var \OC\Files\Storage\Wrapper\Encryption |\PHPUnit\Framework\MockObject\MockObject $instance */
$instance = $this->getMockBuilder('\OC\Files\Storage\Wrapper\Encryption')
->setConstructorArgs(
[
@@ -994,7 +994,7 @@ class EncryptionTest extends Storage {
->getMock();
if ($encryptionModule === true) {
- /** @var IEncryptionModule|\PHPUnit_Framework_MockObject_MockObject $encryptionModule */
+ /** @var IEncryptionModule|\PHPUnit\Framework\MockObject\MockObject $encryptionModule */
$encryptionModule = $this->createMock(IEncryptionModule::class);
}
diff --git a/tests/lib/Files/Stream/EncryptionTest.php b/tests/lib/Files/Stream/EncryptionTest.php
index bedce1b6f6d..08264f07fcf 100644
--- a/tests/lib/Files/Stream/EncryptionTest.php
+++ b/tests/lib/Files/Stream/EncryptionTest.php
@@ -12,7 +12,7 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class EncryptionTest extends \Test\TestCase {
- /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit_Framework_MockObject_MockObject */
+ /** @var \OCP\Encryption\IEncryptionModule | \PHPUnit\Framework\MockObject\MockObject */
private $encryptionModule;
/**
@@ -325,7 +325,7 @@ class EncryptionTest extends \Test\TestCase {
}
/**
- * @return \PHPUnit_Framework_MockObject_MockObject
+ * @return \PHPUnit\Framework\MockObject\MockObject
*/
protected function buildMockModule() {
$encryptionModule = $this->getMockBuilder('\OCP\Encryption\IEncryptionModule')
diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php
index fad2217bfdb..139516ba374 100644
--- a/tests/lib/Files/ViewTest.php
+++ b/tests/lib/Files/ViewTest.php
@@ -1160,7 +1160,7 @@ class ViewTest extends \Test\TestCase {
private function doTestCopyRenameFail($operation) {
$storage1 = new Temporary([]);
- /** @var \PHPUnit_Framework_MockObject_MockObject|Temporary $storage2 */
+ /** @var \PHPUnit\Framework\MockObject\MockObject|Temporary $storage2 */
$storage2 = $this->getMockBuilder(TemporaryNoCross::class)
->setConstructorArgs([[]])
->setMethods(['fopen'])
@@ -1206,7 +1206,7 @@ class ViewTest extends \Test\TestCase {
}
public function testDeleteFailKeepCache() {
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setConstructorArgs([[]])
->setMethods(['unlink'])
@@ -1585,7 +1585,7 @@ class ViewTest extends \Test\TestCase {
->getMock();
}
- /** @var IMountProvider|\PHPUnit_Framework_MockObject_MockObject $mountProvider */
+ /** @var IMountProvider|\PHPUnit\Framework\MockObject\MockObject $mountProvider */
$mountProvider = $this->createMock(IMountProvider::class);
$mountProvider->expects($this->any())
->method('getMountsForUser')
@@ -1822,7 +1822,7 @@ class ViewTest extends \Test\TestCase {
) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation])
->getMock();
@@ -1872,7 +1872,7 @@ class ViewTest extends \Test\TestCase {
$view = new View('/' . $this->user . '/files/');
$path = 'test_file_put_contents.txt';
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods(['fopen'])
->getMock();
@@ -1911,7 +1911,7 @@ class ViewTest extends \Test\TestCase {
$view = new View('/' . $this->user . '/files/');
$path = 'test_file_put_contents.txt';
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods(['fopen'])
->getMock();
@@ -1966,7 +1966,7 @@ class ViewTest extends \Test\TestCase {
}
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation])
->getMock();
@@ -2048,7 +2048,7 @@ class ViewTest extends \Test\TestCase {
) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation])
->getMock();
@@ -2087,7 +2087,7 @@ class ViewTest extends \Test\TestCase {
public function testLockFileRename($operation, $expectedLockTypeSourceDuring) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$operation, 'getMetaData', 'filemtime'])
->getMock();
@@ -2153,7 +2153,7 @@ class ViewTest extends \Test\TestCase {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods(['copy'])
->getMock();
@@ -2272,11 +2272,11 @@ class ViewTest extends \Test\TestCase {
public function testLockFileRenameCrossStorage($viewOperation, $storageOperation, $expectedLockTypeSourceDuring) {
$view = new View('/' . $this->user . '/files/');
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage */
$storage = $this->getMockBuilder(Temporary::class)
->setMethods([$storageOperation])
->getMock();
- /** @var Temporary|\PHPUnit_Framework_MockObject_MockObject $storage2 */
+ /** @var Temporary|\PHPUnit\Framework\MockObject\MockObject $storage2 */
$storage2 = $this->getMockBuilder(Temporary::class)
->setMethods([$storageOperation, 'getMetaData', 'filemtime'])
->getMock();
@@ -2471,7 +2471,7 @@ class ViewTest extends \Test\TestCase {
$mountPoint = '/' . $this->user . '/files/mount/';
// Mock the mount point
- /** @var TestMoveableMountPoint|\PHPUnit_Framework_MockObject_MockObject $mount */
+ /** @var TestMoveableMountPoint|\PHPUnit\Framework\MockObject\MockObject $mount */
$mount = $this->createMock(TestMoveableMountPoint::class);
$mount->expects($this->once())
->method('getMountPoint')