diff --git a/apps/files/ajax/rename.php b/apps/files/ajax/rename.php index d9ba68428eee8e7c8773a374f45fc1065be45bb8..f4551858283a21adb152160339bea773dc938113 100644 --- a/apps/files/ajax/rename.php +++ b/apps/files/ajax/rename.php @@ -21,8 +21,6 @@ * */ -require_once realpath( dirname(__FILE__).'/../lib/app.php' ); - OCP\JSON::checkLoggedIn(); OCP\JSON::callCheck(); diff --git a/apps/files/tests/ajax_rename.php b/apps/files/tests/ajax_rename.php index 6dc7c120b3be20528658fa30de218531631f911a..23e5761ddda44869855bc22a7f13b59caa29ab95 100644 --- a/apps/files/tests/ajax_rename.php +++ b/apps/files/tests/ajax_rename.php @@ -21,18 +21,15 @@ * */ - -require_once dirname(__FILE__).'/../lib/app.php'; - class Test_OC_Files_App_Rename extends \PHPUnit_Framework_TestCase { function setUp() { // mock OC_L10n - $l10nMock = $this->getMock('\OC_L10N', array('t')); + $l10nMock = $this->getMock('\OC_L10N', array('t'), array(), '', false); $l10nMock->expects($this->any()) ->method('t') ->will($this->returnArgument(0)); - $viewMock = $this->getMock('\OC\Files\View', array('rename', 'normalizePath')); + $viewMock = $this->getMock('\OC\Files\View', array('rename', 'normalizePath'), array(), '', false); $viewMock->expects($this->any()) ->method('normalizePath') ->will($this->returnArgument(0));