Browse Source

fix filesystem and encryption tests

Conflicts:
	apps/files_encryption/lib/util.php
	apps/files_encryption/tests/hooks.php
tags/v8.1.0alpha1
Jörn Friedrich Dreyer 9 years ago
parent
commit
a85bc5538f
1 changed files with 4 additions and 7 deletions
  1. 4
    7
      tests/lib/files/filesystem.php

+ 4
- 7
tests/lib/files/filesystem.php View File



namespace Test\Files; namespace Test\Files;


use OC\User\NoUserException;

class Filesystem extends \Test\TestCase { class Filesystem extends \Test\TestCase {
/** /**
* @var array tmpDirs * @var array tmpDirs
} }


/** /**
* Tests that a local storage mount is used when passed user
* does not exist.
* Tests that an exception is thrown when passed user does not exist.
* @expectedException \OC\User\NoUserException
*/ */
public function testLocalMountWhenUserDoesNotExist() { public function testLocalMountWhenUserDoesNotExist() {
$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data"); $datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
$userId = $this->getUniqueID('user_'); $userId = $this->getUniqueID('user_');


\OC\Files\Filesystem::initMountPoints($userId); \OC\Files\Filesystem::initMountPoints($userId);

$homeMount = \OC\Files\Filesystem::getStorage('/' . $userId . '/');

$this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Local'));
$this->assertEquals('local::' . $datadir . '/' . $userId . '/', $homeMount->getId());
} }


/** /**

Loading…
Cancel
Save