diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php index 6985e2be87ec681548e0d5f5bbfa3f3d4d7aa530..36044731377ed6f61fbff3ede7594a98da82d2d3 100644 --- a/core/Controller/LoginController.php +++ b/core/Controller/LoginController.php @@ -194,7 +194,7 @@ class LoginController extends Controller { return new RedirectResponse($location); } } - return new RedirectResponse($this->urlGenerator->linkTo('files', 'index')); + return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index')); } } diff --git a/tests/core/controller/LoginControllerTest.php b/tests/core/controller/LoginControllerTest.php index 0b5a143f4e3b9f93fbdd049775d014b17e0b0e64..139d48ad7dac26b0a007c18fee9fe7cd67bdcc5c 100644 --- a/tests/core/controller/LoginControllerTest.php +++ b/tests/core/controller/LoginControllerTest.php @@ -299,8 +299,8 @@ class LoginControllerTest extends TestCase { ->method('createSessionToken') ->with($this->request, $user->getUID(), $password); $this->urlGenerator->expects($this->once()) - ->method('linkTo') - ->with('files', 'index') + ->method('linkToRoute') + ->with('files.view.index') ->will($this->returnValue($indexPageUrl)); $expected = new \OCP\AppFramework\Http\RedirectResponse($indexPageUrl);