swift.php 864 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Copyright (c) 2012 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. $config=include('apps/files_external/tests/config.php');
  9. if(!is_array($config) or !isset($config['swift']) or !$config['swift']['run']){
  10. abstract class Test_Filestorage_SWIFT extends Test_FileStorage{}
  11. return;
  12. }else{
  13. class Test_Filestorage_SWIFT extends Test_FileStorage {
  14. private $config;
  15. private $id;
  16. public function setUp(){
  17. $id=uniqid();
  18. $this->config=include('apps/files_external/tests/config.php');
  19. $this->config['swift']['root'].='/'.$id;//make sure we have an new empty folder to work in
  20. $this->instance=new OC_Filestorage_SWIFT($this->config['swift']);
  21. }
  22. public function tearDown(){
  23. $this->instance->rmdir('');
  24. }
  25. }
  26. }