diff options
author | Joas Schilling <coding@schilljs.com> | 2023-09-25 15:33:40 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-09-25 15:54:21 +0200 |
commit | 0956b493b6394a6ea3c748fa5dd0910bc697ba8a (patch) | |
tree | be06005539d5f7d38fb36352578fd841506ee304 /tests | |
parent | 5092278b0f4bf1905fe08d51ad329682b6e8f410 (diff) | |
download | nextcloud-server-0956b493b6394a6ea3c748fa5dd0910bc697ba8a.tar.gz nextcloud-server-0956b493b6394a6ea3c748fa5dd0910bc697ba8a.zip |
fix(phonenumber): Use the newly introduced API to limit 3rdparty lib usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Accounts/AccountManagerTest.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/lib/Accounts/AccountManagerTest.php b/tests/lib/Accounts/AccountManagerTest.php index d12dfbfacea..3d0bee5902f 100644 --- a/tests/lib/Accounts/AccountManagerTest.php +++ b/tests/lib/Accounts/AccountManagerTest.php @@ -26,6 +26,7 @@ namespace Test\Accounts; use OC\Accounts\Account; use OC\Accounts\AccountManager; +use OC\PhoneNumberUtil; use OCA\Settings\BackgroundJobs\VerifyUserData; use OCP\Accounts\IAccountManager; use OCP\Accounts\UserUpdatedEvent; @@ -34,6 +35,7 @@ use OCP\Defaults; use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IDBConnection; +use OCP\IPhoneNumberUtil; use OCP\IURLGenerator; use OCP\IUser; use OCP\L10N\IFactory; @@ -75,6 +77,8 @@ class AccountManagerTest extends TestCase { /** @var IJobList|MockObject */ private $jobList; + /** @var IPhoneNumberUtil */ + private $phoneNumberUtil; /** accounts table name */ private string $table = 'accounts'; @@ -97,6 +101,7 @@ class AccountManagerTest extends TestCase { $this->l10nFactory = $this->createMock(IFactory::class); $this->urlGenerator = $this->createMock(IURLGenerator::class); $this->crypto = $this->createMock(ICrypto::class); + $this->phoneNumberUtil = new PhoneNumberUtil(); $this->accountManager = new AccountManager( $this->connection, @@ -109,7 +114,8 @@ class AccountManagerTest extends TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->crypto + $this->crypto, + $this->phoneNumberUtil, ); } @@ -473,7 +479,8 @@ class AccountManagerTest extends TestCase { $this->defaults, $this->l10nFactory, $this->urlGenerator, - $this->crypto + $this->crypto, + $this->phoneNumberUtil, ]) ->onlyMethods($mockedMethods) ->getMock(); |