google.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * ownCloud
  4. *
  5. * @author Michael Gapczynski
  6. * @copyright 2012 Michael Gapczynski mtgap@owncloud.com
  7. *
  8. * This library is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
  10. * License as published by the Free Software Foundation; either
  11. * version 3 of the License, or any later version.
  12. *
  13. * This library is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public
  19. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. $config=include('apps/files_external/tests/config.php');
  22. if(!is_array($config) or !isset($config['google']) or !$config['google']['run']){
  23. abstract class Test_Filestorage_Google extends Test_FileStorage{}
  24. return;
  25. }else{
  26. class Test_Filestorage_Google extends Test_FileStorage {
  27. private $config;
  28. private $id;
  29. public function setUp(){
  30. $id=uniqid();
  31. $this->config=include('apps/files_external/tests/config.php');
  32. $this->config['google']['root'].='/'.$id;//make sure we have an new empty folder to work in
  33. $this->instance=new OC_Filestorage_Google($this->config['google']);
  34. }
  35. public function tearDown(){
  36. $this->instance->rmdir('/');
  37. }
  38. }
  39. }