From 5cae863408630aee768adf70fdb5c11f72b713fa Mon Sep 17 00:00:00 2001 From: Jörn Friedrich Dreyer Date: Tue, 17 Jun 2014 22:06:56 +0200 Subject: change architecture from inheritance to composition --- tests/lib/files/objectstore/swift.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/lib/files/objectstore') 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? } -- cgit v1.2.3