summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorringmaster <epithet@gmail.com>2014-06-02 10:54:41 -0400
committerThomas Müller <thomas.mueller@tmit.eu>2014-06-04 07:55:46 +0200
commit0e85618c429e3a33492dbd7cf7c6dadf17219926 (patch)
tree0c3e8a327b54e2105d048ef64678270a67214266 /tests
parent48eb0515e9ae96fb5a2ea46307d76454e8b01ae3 (diff)
downloadnextcloud-server-0e85618c429e3a33492dbd7cf7c6dadf17219926.tar.gz
nextcloud-server-0e85618c429e3a33492dbd7cf7c6dadf17219926.zip
Can't use assertInstanceOf on wrapped storage; use assertTrue(instanceOfStorage() instead.
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/filesystem.php10
-rw-r--r--tests/lib/util.php2
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php
index 53f528af793..930a252bcb2 100644
--- a/tests/lib/files/filesystem.php
+++ b/tests/lib/files/filesystem.php
@@ -173,7 +173,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$homeMount = \OC\Files\Filesystem::getStorage('/' . $userId . '/');
- $this->assertInstanceOf('\OC\Files\Storage\Local', $homeMount);
+ $this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Local'));
$this->assertEquals('local::' . $datadir . '/' . $userId . '/', $homeMount->getId());
}
@@ -189,7 +189,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$homeMount = \OC\Files\Filesystem::getStorage('/' . $userId . '/');
- $this->assertInstanceOf('\OC\Files\Storage\Home', $homeMount);
+ $this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Home'));
$this->assertEquals('home::' . $userId, $homeMount->getId());
\OC_User::deleteUser($userId);
@@ -214,7 +214,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
$homeMount = \OC\Files\Filesystem::getStorage('/' . $userId . '/');
- $this->assertInstanceOf('\OC\Files\Storage\Home', $homeMount);
+ $this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Home'));
$this->assertEquals('local::' . $datadir . '/' . $userId . '/', $homeMount->getId());
\OC_User::deleteUser($userId);
@@ -244,7 +244,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
\OC\Files\Filesystem::getMountPoint('/' . $userId . '/cache')
);
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache');
- $this->assertInstanceOf('\OC\Files\Storage\Home', $storage);
+ $this->assertTrue($storage->instanceOfStorage('\OC\Files\Storage\Home'));
$this->assertEquals('cache', $internalPath);
\OC_User::deleteUser($userId);
@@ -271,7 +271,7 @@ class Filesystem extends \PHPUnit_Framework_TestCase {
\OC\Files\Filesystem::getMountPoint('/' . $userId . '/cache')
);
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache');
- $this->assertInstanceOf('\OC\Files\Storage\Local', $storage);
+ $this->assertTrue($storage->instanceOfStorage('\OC\Files\Storage\Local'));
$this->assertEquals('', $internalPath);
\OC_User::deleteUser($userId);
diff --git a/tests/lib/util.php b/tests/lib/util.php
index 0bafb96cabd..aaa47f033de 100644
--- a/tests/lib/util.php
+++ b/tests/lib/util.php
@@ -154,7 +154,7 @@ class Test_Util extends PHPUnit_Framework_TestCase {
$userMount = \OC\Files\Filesystem::getMountManager()->find('/' . $user1 . '/');
$this->assertNotNull($userMount);
- $this->assertInstanceOf('\OC\Files\Storage\Wrapper\Quota', $userMount->getStorage());
+ $this->assertTrue($userMount->getStorage()->instanceOfStorage('\OC\Files\Storage\Wrapper\Quota'));
// ensure that root wasn't wrapped
$rootMount = \OC\Files\Filesystem::getMountManager()->find('/');