diff options
Diffstat (limited to 'tests/lib/Http/WellKnown')
-rw-r--r-- | tests/lib/Http/WellKnown/GenericResponseTest.php | 22 | ||||
-rw-r--r-- | tests/lib/Http/WellKnown/JrdResponseTest.php | 26 | ||||
-rw-r--r-- | tests/lib/Http/WellKnown/RequestManagerTest.php | 34 |
3 files changed, 17 insertions, 65 deletions
diff --git a/tests/lib/Http/WellKnown/GenericResponseTest.php b/tests/lib/Http/WellKnown/GenericResponseTest.php index 1e84a509c1b..f35f43221b8 100644 --- a/tests/lib/Http/WellKnown/GenericResponseTest.php +++ b/tests/lib/Http/WellKnown/GenericResponseTest.php @@ -2,25 +2,9 @@ declare(strict_types=1); -/* - * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> - * - * @author 2020 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: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Tests\Http\WellKnown; diff --git a/tests/lib/Http/WellKnown/JrdResponseTest.php b/tests/lib/Http/WellKnown/JrdResponseTest.php index f540ac1862e..375f244d618 100644 --- a/tests/lib/Http/WellKnown/JrdResponseTest.php +++ b/tests/lib/Http/WellKnown/JrdResponseTest.php @@ -2,25 +2,9 @@ declare(strict_types=1); -/* - * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> - * - * @author 2020 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: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Test\Http\WellKnown; @@ -31,7 +15,7 @@ use Test\TestCase; class JrdResponseTest extends TestCase { public function testEmptyToHttpResponse(): void { - $response = new JrdResponse("subject"); + $response = new JrdResponse('subject'); $httpResponse = $response->toHttpResponse(); self::assertTrue($response->isEmpty()); @@ -46,7 +30,7 @@ class JrdResponseTest extends TestCase { } public function testComplexToHttpResponse(): void { - $response = new JrdResponse("subject"); + $response = new JrdResponse('subject'); $response->addAlias('alias'); $response->addAlias('blias'); $response->addProperty('propa', 'a'); diff --git a/tests/lib/Http/WellKnown/RequestManagerTest.php b/tests/lib/Http/WellKnown/RequestManagerTest.php index d3fd487aa60..3ab6cb190b2 100644 --- a/tests/lib/Http/WellKnown/RequestManagerTest.php +++ b/tests/lib/Http/WellKnown/RequestManagerTest.php @@ -2,25 +2,9 @@ declare(strict_types=1); -/* - * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at> - * - * @author 2020 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: 2020 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later */ namespace Test\Http\WellKnown; @@ -73,7 +57,7 @@ class RequestManagerTest extends TestCase { $request = $this->createMock(IRequest::class); $this->expectException(RuntimeException::class); - $this->manager->process("webfinger", $request); + $this->manager->process('webfinger', $request); } public function testProcessNoHandlersRegistered(): void { @@ -86,7 +70,7 @@ class RequestManagerTest extends TestCase { ->method('getWellKnownHandlers') ->willReturn([]); - $response = $this->manager->process("webfinger", $request); + $response = $this->manager->process('webfinger', $request); self::assertNull($response); } @@ -107,11 +91,11 @@ class RequestManagerTest extends TestCase { $this->container->expects(self::once()) ->method('get') ->with(get_class($handler)) - ->willThrowException(new QueryException("")); + ->willThrowException(new QueryException('')); $this->logger->expects(self::once()) ->method('error'); - $response = $this->manager->process("webfinger", $request); + $response = $this->manager->process('webfinger', $request); self::assertNull($response); } @@ -136,7 +120,7 @@ class RequestManagerTest extends TestCase { $this->logger->expects(self::once()) ->method('error'); - $response = $this->manager->process("webfinger", $request); + $response = $this->manager->process('webfinger', $request); self::assertNull($response); } @@ -162,7 +146,7 @@ class RequestManagerTest extends TestCase { ->with(get_class($handler)) ->willReturn($handler); - $response = $this->manager->process("webfinger", $request); + $response = $this->manager->process('webfinger', $request); self::assertNotNull($response); self::assertInstanceOf(JrdResponse::class, $response); |