[files] rename lib to "App"
This commit is contained in:
parent
b32c30b6d0
commit
b777c0fd75
|
@ -21,12 +21,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once realpath( dirname(__FILE__).'/../lib/files.php' );
|
require_once realpath( dirname(__FILE__).'/../lib/app.php' );
|
||||||
|
|
||||||
OCP\JSON::checkLoggedIn();
|
OCP\JSON::checkLoggedIn();
|
||||||
OCP\JSON::callCheck();
|
OCP\JSON::callCheck();
|
||||||
|
|
||||||
$files = new \OCA\Files\Files(
|
$files = new \OCA\Files\App(
|
||||||
\OC\Files\Filesystem::getView(),
|
\OC\Files\Filesystem::getView(),
|
||||||
\OC_L10n::get('files')
|
\OC_L10n::get('files')
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
namespace OCA\Files;
|
namespace OCA\Files;
|
||||||
|
|
||||||
class Files {
|
class App {
|
||||||
private $l10n;
|
private $l10n;
|
||||||
|
|
||||||
public function __construct($view, $l10n) {
|
public function __construct($view, $l10n) {
|
|
@ -22,9 +22,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/../lib/files.php';
|
require_once dirname(__FILE__).'/../lib/app.php';
|
||||||
|
|
||||||
class Test_OC_Files_Files_Rename extends \PHPUnit_Framework_TestCase {
|
class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase {
|
||||||
|
|
||||||
function setUp() {
|
function setUp() {
|
||||||
// mock OC_L10n
|
// mock OC_L10n
|
||||||
|
@ -39,7 +39,7 @@ class Test_OC_Files_Files_Rename extends \PHPUnit_Framework_TestCase {
|
||||||
$viewMock->expects($this->any())
|
$viewMock->expects($this->any())
|
||||||
->method('rename')
|
->method('rename')
|
||||||
->will($this->returnValue(true));
|
->will($this->returnValue(true));
|
||||||
$this->files = new \OCA\Files\Files($viewMock, $l10nMock);
|
$this->files = new \OCA\Files\App($viewMock, $l10nMock);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,7 +91,7 @@ class Test_OC_Files_Files_Rename extends \PHPUnit_Framework_TestCase {
|
||||||
$result = $this->files->rename($dir, $oldname, $newname);
|
$result = $this->files->rename($dir, $oldname, $newname);
|
||||||
$expected = array(
|
$expected = array(
|
||||||
'success' => false,
|
'success' => false,
|
||||||
'data' => array('message' => "Invalid folder name. Usage of 'Shared' is reserved by Owncloud")
|
'data' => array('message' => "Invalid folder name. Usage of 'Shared' is reserved by ownCloud")
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
|
|
Loading…
Reference in New Issue