diff options
author | Robin Appelman <icewind@owncloud.com> | 2015-03-05 17:31:35 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2015-03-11 15:07:59 +0100 |
commit | 169031d1c5f0fbd3249e5a569b035a39be5a779d (patch) | |
tree | 7562aab176111f493fc76b2bf9b2bece5a3d442b /tests | |
parent | e1f2a6df94af29864778a3ac286887ba51f19b04 (diff) | |
download | nextcloud-server-169031d1c5f0fbd3249e5a569b035a39be5a779d.tar.gz nextcloud-server-169031d1c5f0fbd3249e5a569b035a39be5a779d.zip |
fix factory test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/storage/storagefactory.php | 6 | ||||
-rw-r--r-- | tests/lib/files/view.php | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/tests/lib/files/storage/storagefactory.php b/tests/lib/files/storage/storagefactory.php index 83cae447a4f..15519ef83fb 100644 --- a/tests/lib/files/storage/storagefactory.php +++ b/tests/lib/files/storage/storagefactory.php @@ -10,7 +10,7 @@ namespace Test\Files\Storage; use OC\Files\Mount\MountPoint; use OCP\Files\Mount\IMountPoint; -use OCP\Files\Storage; +use OCP\Files\Storage as IStorage; use Test\TestCase; use OC\Files\Storage\Wrapper\Wrapper; @@ -22,7 +22,7 @@ class StorageFactory extends TestCase { public function testSimpleWrapper() { $instance = new \OC\Files\Storage\StorageFactory(); $mount = new MountPoint('\OC\Files\Storage\Temporary', '/foo', [[]], $instance); - $instance->addStorageWrapper('dummy', function ($mountPoint, Storage $storage, IMountPoint $mount) { + $instance->addStorageWrapper('dummy', function ($mountPoint, IStorage $storage, IMountPoint $mount) { $this->assertInstanceOf('\OC\Files\Storage\Temporary', $storage); $this->assertEquals('/foo/', $mount->getMountPoint()); $this->assertEquals('/foo/', $mountPoint); @@ -35,7 +35,7 @@ class StorageFactory extends TestCase { public function testRemoveWrapper() { $instance = new \OC\Files\Storage\StorageFactory(); $mount = new MountPoint('\OC\Files\Storage\Temporary', '/foo', [[]], $instance); - $instance->addStorageWrapper('dummy', function ($mountPoint, Storage $storage) { + $instance->addStorageWrapper('dummy', function ($mountPoint, IStorage $storage) { return new DummyWrapper(['storage' => $storage]); }); $instance->removeStorageWrapper('dummy'); diff --git a/tests/lib/files/view.php b/tests/lib/files/view.php index 475383b5fe0..9ff46705b87 100644 --- a/tests/lib/files/view.php +++ b/tests/lib/files/view.php @@ -8,7 +8,6 @@ namespace Test\Files; use OC\Files\Cache\Watcher; -use OC\Files\Filesystem; use OC\Files\Mount\MountPoint; use OC\Files\Storage\Temporary; @@ -980,7 +979,7 @@ class View extends \Test\TestCase { public function testSetMountOptionsInStorage() { $mount = new MountPoint('\OC\Files\Storage\Temporary', '/asd/', [[]], Filesystem::getLoader(), ['foo' => 'bar']); - Filesystem::getMountManager()->addMount($mount); + \OC\Files\Filesystem::getMountManager()->addMount($mount); /** @var \OC\Files\Storage\Common $storage */ $storage = $mount->getStorage(); $this->assertEquals($storage->getMountOption('foo'), 'bar'); @@ -988,7 +987,7 @@ class View extends \Test\TestCase { public function testSetMountOptionsWatcherPolicy() { $mount = new MountPoint('\OC\Files\Storage\Temporary', '/asd/', [[]], Filesystem::getLoader(), ['filesystem_check_changes' => Watcher::CHECK_NEVER]); - Filesystem::getMountManager()->addMount($mount); + \OC\Files\Filesystem::getMountManager()->addMount($mount); /** @var \OC\Files\Storage\Common $storage */ $storage = $mount->getStorage(); $watcher = $storage->getWatcher(); |