From b777c0fd7501c59f0389c34303e98867e94cd20b Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 8 May 2013 11:56:59 +0200 Subject: [PATCH] [files] rename lib to "App" --- apps/files/ajax/rename.php | 4 ++-- apps/files/lib/{files.php => app.php} | 2 +- apps/files/tests/ajax_rename.php | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) rename apps/files/lib/{files.php => app.php} (99%) diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php index f01932a73c3..d9ba68428ee 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -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::callCheck(); -$files = new \OCA\Files\Files( +$files = new \OCA\Files\App( \OC\Files\Filesystem::getView(), \OC_L10n::get('files') ); diff --git a/apps/files/lib/files.php b/apps/files/lib/app.php similarity index 99% rename from apps/files/lib/files.php rename to apps/files/lib/app.php index 2d47fcf4ad3..7cd6143e6c1 100644 --- a/apps/files/lib/files.php +++ b/apps/files/lib/app.php @@ -24,7 +24,7 @@ namespace OCA\Files; -class Files { +class App { private $l10n; public function __construct($view, $l10n) { diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php index dee956dc8c8..6dc7c120b3b 100644 --- a/apps/files/tests/ajax_rename.php +++ b/apps/files/tests/ajax_rename.php @@ -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() { // mock OC_L10n @@ -39,7 +39,7 @@ class Test_OC_Files_Files_Rename extends \PHPUnit_Framework_TestCase { $viewMock->expects($this->any()) ->method('rename') ->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); $expected = array( '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); -- 2.39.5