protected function tearDown()
 {
     if ($this->instance) {
         $this->instance->rmdir('/');
     }
     parent::tearDown();
 }
Exemple #2
0
 protected function tearDown()
 {
     if ($this->instance) {
         \OCP\Files::rmdirr($this->instance->constructUrl(''));
     }
     parent::tearDown();
 }
 protected function tearDown()
 {
     if (is_null($this->instance)) {
         return;
     }
     $this->objectStorage->deleteContainer(true);
     $this->instance->getCache()->clear();
     parent::tearDown();
 }
Exemple #4
0
 protected function tearDown()
 {
     if (is_null($this->instance)) {
         return;
     }
     $this->objectStorage->deleteContainer(true);
     $this->instance->getCache()->clear();
     $users = array('test');
     foreach ($users as $userName) {
         \OC_User::deleteUser($userName);
     }
     parent::tearDown();
 }
Exemple #5
0
	public function tearDown() {
		// test that nothing outside our jail is touched
		$contents = array();
		$dh = $this->sourceStorage->opendir('');
		while ($file = readdir($dh)) {
			if ($file !== '.' and $file !== '..') {
				$contents[] = $file;
			}
		}
		$this->assertEquals(array('foo'), $contents);
		$this->sourceStorage->cleanUp();
		parent::tearDown();
	}
Exemple #6
0
 protected function tearDown()
 {
     if (is_null($this->instance)) {
         return;
     }
     $this->objectStorage->deleteContainer(true);
     $this->instance->getCache()->clear();
     $users = array('test');
     foreach ($users as $userName) {
         $user = \OC::$server->getUserManager()->get($userName);
         if ($user !== null) {
             $user->delete();
         }
     }
     parent::tearDown();
 }
Exemple #7
0
 protected function tearDown()
 {
     if ($this->instance) {
         try {
             $connection = $this->instance->getConnection();
             $container = $connection->getContainer($this->config['bucket']);
             $objects = $container->objectList();
             while ($object = $objects->next()) {
                 $object->setName(str_replace('#', '%23', $object->getName()));
                 $object->delete();
             }
             $container->delete();
         } catch (\Guzzle\Http\Exception\ClientErrorResponseException $e) {
             // container didn't exist, so we don't need to delete it
         }
     }
     parent::tearDown();
 }
Exemple #8
0
	protected function tearDown() {
		\OC_Helper::rmdirr($this->tmpDir);
		parent::tearDown();
	}
 public function tearDown()
 {
     $this->sourceStorage->cleanUp();
     parent::tearDown();
 }