summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2021-04-23 10:33:08 +0100
committerGreg Roach <fisharebest@gmail.com>2021-04-28 15:43:49 +0100
commitc9c6f2ec6e88594e58f14a6418e0de5aaa1484bd (patch)
tree9436395efa67c4626f01246de19562e35f8d5238 /tests
parent32294542f5c0786d6b52bc6af4645d1580151e05 (diff)
downloadwebtrees-c9c6f2ec6e88594e58f14a6418e0de5aaa1484bd.tar.gz
webtrees-c9c6f2ec6e88594e58f14a6418e0de5aaa1484bd.tar.bz2
webtrees-c9c6f2ec6e88594e58f14a6418e0de5aaa1484bd.zip
Merge: #3803, Merge: #3706
Diffstat (limited to 'tests')
-rw-r--r--tests/app/Http/RequestHandlers/MapProviderActionTest.php46
-rw-r--r--tests/app/Http/RequestHandlers/MapProviderPageTest.php45
-rw-r--r--tests/app/Module/MapLinkBingTest.php (renamed from tests/app/Module/MapLinkBingModuleTest.php)8
-rw-r--r--tests/app/Module/MapLinkGoogleTest.php (renamed from tests/app/Module/MapLinkGoogleModuleTest.php)8
-rw-r--r--tests/app/Module/MapLinkOpenStreetMapTest.php (renamed from tests/app/Module/MapLinkOpenStreetMapModuleTest.php)8
5 files changed, 12 insertions, 103 deletions
diff --git a/tests/app/Http/RequestHandlers/MapProviderActionTest.php b/tests/app/Http/RequestHandlers/MapProviderActionTest.php
deleted file mode 100644
index 8e99a59d92..0000000000
--- a/tests/app/Http/RequestHandlers/MapProviderActionTest.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2021 webtrees development team
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-declare(strict_types=1);
-
-namespace Fisharebest\Webtrees\Http\RequestHandlers;
-
-use Fig\Http\Message\RequestMethodInterface;
-use Fig\Http\Message\StatusCodeInterface;
-use Fisharebest\Webtrees\TestCase;
-
-/**
- * Test the MapProviderAction request handler.
- *
- * @covers \Fisharebest\Webtrees\Http\RequestHandlers\MapProviderAction
- */
-class MapProviderActionTest extends TestCase
-{
- protected static $uses_database = true;
-
- /**
- * @return void
- */
- public function testMapProviderAction(): void
- {
- $handler = new MapProviderAction();
- $request = self::createRequest(RequestMethodInterface::METHOD_POST, [], ['provider' => '', 'geonames' => '']);
- $response = $handler->handle($request);
-
- self::assertSame(StatusCodeInterface::STATUS_FOUND, $response->getStatusCode());
- }
-}
diff --git a/tests/app/Http/RequestHandlers/MapProviderPageTest.php b/tests/app/Http/RequestHandlers/MapProviderPageTest.php
deleted file mode 100644
index 95db1ff6ec..0000000000
--- a/tests/app/Http/RequestHandlers/MapProviderPageTest.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * webtrees: online genealogy
- * Copyright (C) 2021 webtrees development team
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU 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 General Public License for more details.
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
-declare(strict_types=1);
-
-namespace Fisharebest\Webtrees\Http\RequestHandlers;
-
-use Fig\Http\Message\StatusCodeInterface;
-use Fisharebest\Webtrees\TestCase;
-
-/**
- * Test the MapProviderPage request handler.
- *
- * @covers \Fisharebest\Webtrees\Http\RequestHandlers\MapProviderPage
- */
-class MapProviderPageTest extends TestCase
-{
- protected static $uses_database = true;
-
- /**
- * @return void
- */
- public function testMapProviderPage(): void
- {
- $handler = new MapProviderPage();
- $request = self::createRequest();
- $response = $handler->handle($request);
-
- self::assertSame(StatusCodeInterface::STATUS_OK, $response->getStatusCode());
- }
-}
diff --git a/tests/app/Module/MapLinkBingModuleTest.php b/tests/app/Module/MapLinkBingTest.php
index 0a1d8f3eb6..743235a75f 100644
--- a/tests/app/Module/MapLinkBingModuleTest.php
+++ b/tests/app/Module/MapLinkBingTest.php
@@ -25,17 +25,17 @@ use Fisharebest\Webtrees\Individual;
use Fisharebest\Webtrees\TestCase;
/**
- * @covers \Fisharebest\Webtrees\Module\MapLinkBingModule
+ * @covers \Fisharebest\Webtrees\Module\MapLinkBing
* @covers \Fisharebest\Webtrees\Module\ModuleMapLinkTrait
*/
-class MapLinkBingModuleTest extends TestCase
+class MapLinkBingTest extends TestCase
{
/**
* @return void
*/
public function testNoCoordinates(): void
{
- $module = new MapLinkBingModule();
+ $module = new MapLinkBing();
$fact = $this->createMock(Fact::class);
$fact->method('latitude')->willReturn(null);
@@ -53,7 +53,7 @@ class MapLinkBingModuleTest extends TestCase
*/
public function testLink(): void
{
- $module = new MapLinkBingModule();
+ $module = new MapLinkBing();
$record = $this->createMock(Individual::class);
$record->method('fullName')->willReturn('FULL NAME');
diff --git a/tests/app/Module/MapLinkGoogleModuleTest.php b/tests/app/Module/MapLinkGoogleTest.php
index 641878b40a..76cfc64c6b 100644
--- a/tests/app/Module/MapLinkGoogleModuleTest.php
+++ b/tests/app/Module/MapLinkGoogleTest.php
@@ -25,17 +25,17 @@ use Fisharebest\Webtrees\Individual;
use Fisharebest\Webtrees\TestCase;
/**
- * @covers \Fisharebest\Webtrees\Module\MapLinkBingModule
+ * @covers \Fisharebest\Webtrees\Module\MapLinkBing
* @covers \Fisharebest\Webtrees\Module\ModuleMapLinkTrait
*/
-class MapLinkGoogleModuleTest extends TestCase
+class MapLinkGoogleTest extends TestCase
{
/**
* @return void
*/
public function testNoCoordinates(): void
{
- $module = new MapLinkGoogleModule();
+ $module = new MapLinkGoogle();
$fact = $this->createMock(Fact::class);
$fact->method('latitude')->willReturn(null);
@@ -51,7 +51,7 @@ class MapLinkGoogleModuleTest extends TestCase
*/
public function testLink(): void
{
- $module = new MapLinkGoogleModule();
+ $module = new MapLinkGoogle();
$record = $this->createMock(Individual::class);
$record->method('fullName')->willReturn('FULL NAME');
diff --git a/tests/app/Module/MapLinkOpenStreetMapModuleTest.php b/tests/app/Module/MapLinkOpenStreetMapTest.php
index 13af591f72..302a470be2 100644
--- a/tests/app/Module/MapLinkOpenStreetMapModuleTest.php
+++ b/tests/app/Module/MapLinkOpenStreetMapTest.php
@@ -25,17 +25,17 @@ use Fisharebest\Webtrees\Individual;
use Fisharebest\Webtrees\TestCase;
/**
- * @covers \Fisharebest\Webtrees\Module\MapLinkOpenStreetMapModule
+ * @covers \Fisharebest\Webtrees\Module\MapLinkOpenStreetMap
* @covers \Fisharebest\Webtrees\Module\ModuleMapLinkTrait
*/
-class MapLinkOpenStreetMapModuleTest extends TestCase
+class MapLinkOpenStreetMapTest extends TestCase
{
/**
* @return void
*/
public function testNoCoordinates(): void
{
- $module = new MapLinkOpenStreetMapModule();
+ $module = new MapLinkOpenStreetMap();
$fact = $this->createMock(Fact::class);
$fact->method('latitude')->willReturn(null);
@@ -51,7 +51,7 @@ class MapLinkOpenStreetMapModuleTest extends TestCase
*/
public function testLink(): void
{
- $module = new MapLinkOpenStreetMapModule();
+ $module = new MapLinkOpenStreetMap();
$record = $this->createMock(Individual::class);
$record->method('fullName')->willReturn('FULL NAME');