1
0

WrapperTest.php 963 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
  4. * This file is licensed under the Affero General Public License version 3 or
  5. * later.
  6. * See the COPYING-README file.
  7. */
  8. namespace Test\Files\Storage\Wrapper;
  9. class WrapperTest extends \Test\Files\Storage\Storage {
  10. /**
  11. * @var string tmpDir
  12. */
  13. private $tmpDir;
  14. protected function setUp() {
  15. parent::setUp();
  16. $this->tmpDir = \OC::$server->getTempManager()->getTemporaryFolder();
  17. $storage = new \OC\Files\Storage\Local(array('datadir' => $this->tmpDir));
  18. $this->instance = new \OC\Files\Storage\Wrapper\Wrapper(array('storage' => $storage));
  19. }
  20. protected function tearDown() {
  21. \OC_Helper::rmdirr($this->tmpDir);
  22. parent::tearDown();
  23. }
  24. public function testInstanceOfStorageWrapper() {
  25. $this->assertTrue($this->instance->instanceOfStorage('\OC\Files\Storage\Local'));
  26. $this->assertTrue($this->instance->instanceOfStorage('\OC\Files\Storage\Wrapper\Wrapper'));
  27. }
  28. }