diff options
author | Joas Schilling <coding@schilljs.com> | 2020-12-01 14:33:22 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-07 14:19:37 +0100 |
commit | da9462b482c77b71d6623be43a6aa1eda3d7cc06 (patch) | |
tree | fe78e9c97f50180140fb222a8a0c41c3fcd8ddd8 /tests/lib/Accounts | |
parent | eab710c2fd6febbf946be3ce8376fb386b61ee90 (diff) | |
download | nextcloud-server-da9462b482c77b71d6623be43a6aa1eda3d7cc06.tar.gz nextcloud-server-da9462b482c77b71d6623be43a6aa1eda3d7cc06.zip |
Make code strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/Accounts')
-rw-r--r-- | tests/lib/Accounts/HooksTest.php | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/lib/Accounts/HooksTest.php b/tests/lib/Accounts/HooksTest.php index 39003b2ef23..8af9e209034 100644 --- a/tests/lib/Accounts/HooksTest.php +++ b/tests/lib/Accounts/HooksTest.php @@ -23,6 +23,7 @@ namespace Test\Accounts; use OC\Accounts\AccountManager; use OC\Accounts\Hooks; +use OCP\Accounts\IAccountManager; use OCP\IUser; use PHPUnit\Framework\MockObject\MockObject; use Psr\Log\LoggerInterface; @@ -77,11 +78,11 @@ class HooksTest extends TestCase { $this->accountManager->expects($this->once())->method('getUser')->willReturn($data); $newData = $data; if ($setEmail) { - $newData[AccountManager::PROPERTY_EMAIL]['value'] = $params['value']; + $newData[IAccountManager::PROPERTY_EMAIL]['value'] = $params['value']; $this->accountManager->expects($this->once())->method('updateUser') ->with($params['user'], $newData); } elseif ($setDisplayName) { - $newData[AccountManager::PROPERTY_DISPLAYNAME]['value'] = $params['value']; + $newData[IAccountManager::PROPERTY_DISPLAYNAME]['value'] = $params['value']; $this->accountManager->expects($this->once())->method('updateUser') ->with($params['user'], $newData); } else { @@ -98,48 +99,48 @@ class HooksTest extends TestCase { [ ['feature' => '', 'value' => ''], [ - AccountManager::PROPERTY_EMAIL => ['value' => ''], - AccountManager::PROPERTY_DISPLAYNAME => ['value' => ''] + IAccountManager::PROPERTY_EMAIL => ['value' => ''], + IAccountManager::PROPERTY_DISPLAYNAME => ['value' => ''] ], false, false, true ], [ ['user' => $user, 'value' => ''], [ - AccountManager::PROPERTY_EMAIL => ['value' => ''], - AccountManager::PROPERTY_DISPLAYNAME => ['value' => ''] + IAccountManager::PROPERTY_EMAIL => ['value' => ''], + IAccountManager::PROPERTY_DISPLAYNAME => ['value' => ''] ], false, false, true ], [ ['user' => $user, 'feature' => ''], [ - AccountManager::PROPERTY_EMAIL => ['value' => ''], - AccountManager::PROPERTY_DISPLAYNAME => ['value' => ''] + IAccountManager::PROPERTY_EMAIL => ['value' => ''], + IAccountManager::PROPERTY_DISPLAYNAME => ['value' => ''] ], false, false, true ], [ ['user' => $user, 'feature' => 'foo', 'value' => 'bar'], [ - AccountManager::PROPERTY_EMAIL => ['value' => 'oldMail@example.com'], - AccountManager::PROPERTY_DISPLAYNAME => ['value' => 'oldDisplayName'] + IAccountManager::PROPERTY_EMAIL => ['value' => 'oldMail@example.com'], + IAccountManager::PROPERTY_DISPLAYNAME => ['value' => 'oldDisplayName'] ], false, false, false ], [ ['user' => $user, 'feature' => 'eMailAddress', 'value' => 'newMail@example.com'], [ - AccountManager::PROPERTY_EMAIL => ['value' => 'oldMail@example.com'], - AccountManager::PROPERTY_DISPLAYNAME => ['value' => 'oldDisplayName'] + IAccountManager::PROPERTY_EMAIL => ['value' => 'oldMail@example.com'], + IAccountManager::PROPERTY_DISPLAYNAME => ['value' => 'oldDisplayName'] ], true, false, false ], [ ['user' => $user, 'feature' => 'displayName', 'value' => 'newDisplayName'], [ - AccountManager::PROPERTY_EMAIL => ['value' => 'oldMail@example.com'], - AccountManager::PROPERTY_DISPLAYNAME => ['value' => 'oldDisplayName'] + IAccountManager::PROPERTY_EMAIL => ['value' => 'oldMail@example.com'], + IAccountManager::PROPERTY_DISPLAYNAME => ['value' => 'oldDisplayName'] ], false, true, false ], |