aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php')
-rw-r--r--tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php35
1 files changed, 8 insertions, 27 deletions
diff --git a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php
index c0052469aba..648351c2ca9 100644
--- a/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php
+++ b/tests/lib/Contacts/ContactsMenu/Providers/EMailproviderTest.php
@@ -1,25 +1,8 @@
<?php
/**
- * @copyright 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @author 2017 Christoph Wurst <christoph@winzerhof-wurst.at>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
+ * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
+ * SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace Tests\Contacts\ContactsMenu\Providers;
@@ -29,18 +12,17 @@ use OCP\Contacts\ContactsMenu\IActionFactory;
use OCP\Contacts\ContactsMenu\IEntry;
use OCP\Contacts\ContactsMenu\ILinkAction;
use OCP\IURLGenerator;
+use PHPUnit\Framework\MockObject\MockObject;
use Test\TestCase;
class EMailproviderTest extends TestCase {
-
- /** @var IActionFactory|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IActionFactory|MockObject */
private $actionFactory;
- /** @var IURLGenerator|\PHPUnit\Framework\MockObject\MockObject */
+ /** @var IURLGenerator|MockObject */
private $urlGenerator;
- /** @var EMailProvider */
- private $provider;
+ private EMailProvider $provider;
protected function setUp(): void {
parent::setUp();
@@ -51,7 +33,7 @@ class EMailproviderTest extends TestCase {
$this->provider = new EMailProvider($this->actionFactory, $this->urlGenerator);
}
- public function testProcess() {
+ public function testProcess(): void {
$entry = $this->createMock(IEntry::class);
$action = $this->createMock(ILinkAction::class);
$iconUrl = 'https://example.com/img/actions/icon.svg';
@@ -78,9 +60,8 @@ class EMailproviderTest extends TestCase {
$this->provider->process($entry);
}
- public function testProcessEmptyAddress() {
+ public function testProcessEmptyAddress(): void {
$entry = $this->createMock(IEntry::class);
- $action = $this->createMock(ILinkAction::class);
$iconUrl = 'https://example.com/img/actions/icon.svg';
$this->urlGenerator->expects($this->once())
->method('imagePath')