From 3e815f555d6471c8c8f4b1c7480d60566ec6321b Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 24 Mar 2021 09:02:19 +0100 Subject: [PATCH] Fix more controller tests in Core subdir Signed-off-by: Vincent Petry --- .../Controller/AutoCompleteControllerTest.php | 16 ++++++++-------- tests/Core/Controller/LoginControllerTest.php | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/Core/Controller/AutoCompleteControllerTest.php b/tests/Core/Controller/AutoCompleteControllerTest.php index 73bc849211..61fc90e3c8 100644 --- a/tests/Core/Controller/AutoCompleteControllerTest.php +++ b/tests/Core/Controller/AutoCompleteControllerTest.php @@ -75,8 +75,8 @@ class AutoCompleteControllerTest extends TestCase { ], // expected [ - [ 'id' => 'alice', 'label' => 'Alice A.', 'source' => 'users'], - [ 'id' => 'bob', 'label' => 'Bob Y.', 'source' => 'users'], + [ 'id' => 'alice', 'label' => 'Alice A.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], + [ 'id' => 'bob', 'label' => 'Bob Y.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], ], '', 'files', @@ -96,8 +96,8 @@ class AutoCompleteControllerTest extends TestCase { ], // expected [ - [ 'id' => 'alice', 'label' => 'Alice A.', 'source' => 'users'], - [ 'id' => 'bob', 'label' => 'Bob Y.', 'source' => 'users'], + [ 'id' => 'alice', 'label' => 'Alice A.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], + [ 'id' => 'bob', 'label' => 'Bob Y.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], ], '', null, @@ -117,8 +117,8 @@ class AutoCompleteControllerTest extends TestCase { ], // expected [ - [ 'id' => 'alice', 'label' => 'Alice A.', 'source' => 'users'], - [ 'id' => 'bob', 'label' => 'Bob Y.', 'source' => 'users'], + [ 'id' => 'alice', 'label' => 'Alice A.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], + [ 'id' => 'bob', 'label' => 'Bob Y.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], ], '', 'files', @@ -138,8 +138,8 @@ class AutoCompleteControllerTest extends TestCase { ], ], [ - [ 'id' => 'bob', 'label' => 'Bob Y.', 'source' => 'users'], - [ 'id' => 'bobby', 'label' => 'Robert R.', 'source' => 'users'], + [ 'id' => 'bob', 'label' => 'Bob Y.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], + [ 'id' => 'bobby', 'label' => 'Robert R.', 'icon' => '', 'source' => 'users', 'status' => '', 'subline' => ''], ], 'bob', 'files', diff --git a/tests/Core/Controller/LoginControllerTest.php b/tests/Core/Controller/LoginControllerTest.php index e9d4a89aa7..e3469621ee 100644 --- a/tests/Core/Controller/LoginControllerTest.php +++ b/tests/Core/Controller/LoginControllerTest.php @@ -440,6 +440,7 @@ class LoginControllerTest extends TestCase { ->with('core.login.showLoginForm', [ 'user' => $user, 'redirect_url' => '/apps/files', + 'direct' => 1, ]) ->willReturn($loginPageUrl); $expected = new \OCP\AppFramework\Http\RedirectResponse($loginPageUrl); @@ -597,6 +598,7 @@ class LoginControllerTest extends TestCase { ->with('core.login.showLoginForm', [ 'user' => 'john@doe.com', 'redirect_url' => '/apps/files', + 'direct' => 1, ]) ->willReturn($loginPageUrl); $expected = new \OCP\AppFramework\Http\RedirectResponse($loginPageUrl);