diff options
Diffstat (limited to 'apps/user_ldap/tests/Settings')
-rw-r--r-- | apps/user_ldap/tests/Settings/AdminTest.php | 8 | ||||
-rw-r--r-- | apps/user_ldap/tests/Settings/SectionTest.php | 12 |
2 files changed, 9 insertions, 11 deletions
diff --git a/apps/user_ldap/tests/Settings/AdminTest.php b/apps/user_ldap/tests/Settings/AdminTest.php index 05b9697e4c8..b17e96c1a68 100644 --- a/apps/user_ldap/tests/Settings/AdminTest.php +++ b/apps/user_ldap/tests/Settings/AdminTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -20,13 +22,12 @@ use Test\TestCase; */ class AdminTest extends TestCase { private IL10N&MockObject $l10n; - private ITemplateManager $templateManager; private Admin $admin; protected function setUp(): void { parent::setUp(); - $this->l10n = $this->getMockBuilder(IL10N::class)->getMock(); + $this->l10n = $this->createMock(IL10N::class); $this->templateManager = Server::get(ITemplateManager::class); $this->admin = new Admin( @@ -35,9 +36,6 @@ class AdminTest extends TestCase { ); } - /** - * @UseDB - */ public function testGetForm(): void { $prefixes = ['s01']; $hosts = ['s01' => '']; diff --git a/apps/user_ldap/tests/Settings/SectionTest.php b/apps/user_ldap/tests/Settings/SectionTest.php index 722581713d1..3f9ae1e56d4 100644 --- a/apps/user_ldap/tests/Settings/SectionTest.php +++ b/apps/user_ldap/tests/Settings/SectionTest.php @@ -1,4 +1,6 @@ <?php + +declare(strict_types=1); /** * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later @@ -8,15 +10,13 @@ namespace OCA\User_LDAP\Tests\Settings; use OCA\User_LDAP\Settings\Section; use OCP\IL10N; use OCP\IURLGenerator; +use PHPUnit\Framework\MockObject\MockObject; use Test\TestCase; class SectionTest extends TestCase { - /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */ - private $url; - /** @var IL10N|\PHPUnit\Framework\MockObject\MockObject */ - private $l; - /** @var Section */ - private $section; + private IURLGenerator&MockObject $url; + private IL10N&MockObject $l; + private Section $section; protected function setUp(): void { parent::setUp(); |