diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-06-17 22:06:56 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-06-18 12:53:20 +0200 |
commit | 5cae863408630aee768adf70fdb5c11f72b713fa (patch) | |
tree | 8de499b906379bd25e2e3a23b5a15581523586c9 /tests | |
parent | 9335a5f07f667ae5c917cc1ee065bceecdb65795 (diff) | |
download | nextcloud-server-5cae863408630aee768adf70fdb5c11f72b713fa.tar.gz nextcloud-server-5cae863408630aee768adf70fdb5c11f72b713fa.zip |
change architecture from inheritance to composition
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/files/objectstore/swift.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/lib/files/objectstore/swift.php b/tests/lib/files/objectstore/swift.php index 497ea7f241c..d05af4d6587 100644 --- a/tests/lib/files/objectstore/swift.php +++ b/tests/lib/files/objectstore/swift.php @@ -20,6 +20,7 @@ namespace OCA\ObjectStore\Tests\Unit; +use OC\Files\ObjectStore\ObjectStoreStorage; use OC\Files\ObjectStore\Swift as ObjectStoreToTest; use PHPUnit_Framework_TestCase; @@ -30,6 +31,8 @@ class Swift extends PHPUnit_Framework_TestCase { * @var \OC\Files\ObjectStore\Swift $storage */ private $storage; + + private $objectStorage; public function setUp() { @@ -67,14 +70,16 @@ class Swift extends PHPUnit_Framework_TestCase { 'serviceName' => 'swift', //trystack uses swift by default, the lib defaults to 'cloudFiles' if omitted 'user' => \OC_User::getManager()->get($userName) ); - $this->storage = new ObjectStoreToTest($params); + $this->objectStorage = new ObjectStoreToTest($params); + $params['objectstore'] = $this->objectStorage; + $this->storage = new ObjectStoreStorage($params); } public function tearDown() { if (is_null($this->storage)) { return; } - $this->storage->deleteContainer(true); + $this->objectStorage->deleteContainer(true); $this->storage->getCache()->clear(); //TODO how do I clear hooks? } |