From f39fdaf46e6ab9b3840102bb657cce7d0b074e6f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 6 Jun 2017 11:42:48 +0200 Subject: adjust the test Signed-off-by: Joas Schilling --- tests/Settings/Controller/UsersControllerTest.php | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) (limited to 'tests') diff --git a/tests/Settings/Controller/UsersControllerTest.php b/tests/Settings/Controller/UsersControllerTest.php index 5905023e960..7186ce7bebd 100644 --- a/tests/Settings/Controller/UsersControllerTest.php +++ b/tests/Settings/Controller/UsersControllerTest.php @@ -2005,6 +2005,52 @@ class UsersControllerTest extends \Test\TestCase { $saveData = (!empty($email) && $validEmail) || empty($email); if ($saveData) { + $this->accountManager->expects($this->once()) + ->method('getUser') + ->with($user) + ->willReturn([ + AccountManager::PROPERTY_DISPLAYNAME => + [ + 'value' => 'Display name', + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, + 'verified' => AccountManager::NOT_VERIFIED, + ], + AccountManager::PROPERTY_ADDRESS => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + 'verified' => AccountManager::NOT_VERIFIED, + ], + AccountManager::PROPERTY_WEBSITE => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + 'verified' => AccountManager::NOT_VERIFIED, + ], + AccountManager::PROPERTY_EMAIL => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY, + 'verified' => AccountManager::NOT_VERIFIED, + ], + AccountManager::PROPERTY_AVATAR => + [ + 'scope' => AccountManager::VISIBILITY_CONTACTS_ONLY + ], + AccountManager::PROPERTY_PHONE => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + 'verified' => AccountManager::NOT_VERIFIED, + ], + AccountManager::PROPERTY_TWITTER => + [ + 'value' => '', + 'scope' => AccountManager::VISIBILITY_PRIVATE, + 'verified' => AccountManager::NOT_VERIFIED, + ], + ]); + $controller->expects($this->once())->method('saveUserSettings'); } else { $controller->expects($this->never())->method('saveUserSettings'); -- cgit v1.2.3