summaryrefslogtreecommitdiffstats
path: root/tests/lib/files
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-11-25 16:28:41 +0100
committerJoas Schilling <nickvergessen@gmx.de>2014-11-25 16:30:21 +0100
commit2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5 (patch)
tree340a259839e2ce8260115d7aeae3798d91cb7768 /tests/lib/files
parent711912a7b3f48065b220a909e8889aba5a93d105 (diff)
downloadnextcloud-server-2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5.tar.gz
nextcloud-server-2c39aec8cb8ce7f74c8edd1111e7f7b6a70cf7c5.zip
Replace deprecated constant with new class constant
Diffstat (limited to 'tests/lib/files')
-rw-r--r--tests/lib/files/node/file.php28
-rw-r--r--tests/lib/files/node/folder.php14
-rw-r--r--tests/lib/files/node/node.php6
3 files changed, 24 insertions, 24 deletions
diff --git a/tests/lib/files/node/file.php b/tests/lib/files/node/file.php
index 34ec7dee213..1ae312ab5a8 100644
--- a/tests/lib/files/node/file.php
+++ b/tests/lib/files/node/file.php
@@ -39,7 +39,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$view->expects($this->once())
->method('unlink')
@@ -89,7 +89,7 @@ class File extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 1)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1)));
$view->expects($this->once())
->method('unlink')
@@ -124,7 +124,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$node->delete();
@@ -156,7 +156,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$this->assertEquals('bar', $node->getContent());
@@ -201,7 +201,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$view->expects($this->once())
->method('file_put_contents')
@@ -226,7 +226,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$node->putContent('bar');
@@ -279,7 +279,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$fh = $node->fopen('r');
@@ -316,7 +316,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$fh = $node->fopen('w');
@@ -375,7 +375,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_UPDATE)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_UPDATE)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$node->fopen('w');
@@ -402,7 +402,7 @@ class File extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$node->fopen('w');
@@ -425,7 +425,7 @@ class File extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 3)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 3)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$parentNode = new \OC\Files\Node\Folder($root, $view, '/bar');
@@ -469,7 +469,7 @@ class File extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ, 'fileid' => 3)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ, 'fileid' => 3)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$parentNode = new \OC\Files\Node\Folder($root, $view, '/bar');
@@ -556,7 +556,7 @@ class File extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 1)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1)));
$node = new \OC\Files\Node\File($root, $view, '/bar/foo');
$parentNode = new \OC\Files\Node\Folder($root, $view, '/bar');
@@ -587,7 +587,7 @@ class File extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$view->expects($this->never())
->method('rename');
diff --git a/tests/lib/files/node/folder.php b/tests/lib/files/node/folder.php
index e348e452f6f..91aa3b82db2 100644
--- a/tests/lib/files/node/folder.php
+++ b/tests/lib/files/node/folder.php
@@ -39,7 +39,7 @@ class Folder extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$view->expects($this->once())
->method('rmdir')
@@ -87,7 +87,7 @@ class Folder extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL, 'fileid' => 1)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL, 'fileid' => 1)));
$view->expects($this->once())
->method('rmdir')
@@ -121,7 +121,7 @@ class Folder extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\Folder($root, $view, '/bar/foo');
$node->delete();
@@ -255,7 +255,7 @@ class Folder extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$view->expects($this->once())
->method('mkdir')
@@ -285,7 +285,7 @@ class Folder extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\Folder($root, $view, '/bar/foo');
$node->newFolder('asd');
@@ -305,7 +305,7 @@ class Folder extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$view->expects($this->once())
->method('touch')
@@ -335,7 +335,7 @@ class Folder extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\Folder($root, $view, '/bar/foo');
$node->newFile('asd');
diff --git a/tests/lib/files/node/node.php b/tests/lib/files/node/node.php
index 80e3ac6f80a..8820be5b0b2 100644
--- a/tests/lib/files/node/node.php
+++ b/tests/lib/files/node/node.php
@@ -246,7 +246,7 @@ class Node extends \Test\TestCase {
$view->expects($this->once())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$node = new \OC\Files\Node\Node($root, $view, '/bar/foo');
$node->touch(100);
@@ -299,7 +299,7 @@ class Node extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_ALL)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_ALL)));
$node = new \OC\Files\Node\Node($root, $view, '/bar/foo');
$node->touch(100);
@@ -323,7 +323,7 @@ class Node extends \Test\TestCase {
$view->expects($this->any())
->method('getFileInfo')
->with('/bar/foo')
- ->will($this->returnValue(array('permissions' => \OCP\PERMISSION_READ)));
+ ->will($this->returnValue(array('permissions' => \OCP\Constants::PERMISSION_READ)));
$node = new \OC\Files\Node\Node($root, $view, '/bar/foo');
$node->touch(100);