summaryrefslogtreecommitdiff
path: root/tests/app
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-02-24 14:05:23 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-02-24 14:57:09 +0000
commit321a89dae12057084d9b58d68d9533212008ee53 (patch)
tree03e1096a047507f518633fd74e335d8502217eaf /tests/app
parent4fbeb707df82fa5025e6110f443695700edd846c (diff)
downloadwebtrees-321a89dae12057084d9b58d68d9533212008ee53.tar.gz
webtrees-321a89dae12057084d9b58d68d9533212008ee53.tar.bz2
webtrees-321a89dae12057084d9b58d68d9533212008ee53.zip
Working on modules
Diffstat (limited to 'tests/app')
-rw-r--r--tests/app/Services/ModuleServiceTest.php32
1 files changed, 2 insertions, 30 deletions
diff --git a/tests/app/Services/ModuleServiceTest.php b/tests/app/Services/ModuleServiceTest.php
index eda133a668..d4588f3726 100644
--- a/tests/app/Services/ModuleServiceTest.php
+++ b/tests/app/Services/ModuleServiceTest.php
@@ -104,36 +104,8 @@ class ModuleServiceTest extends TestCase
$this->assertNotEmpty($module_service->findByInterface(ModuleTabInterface::class)->all());
$this->assertNotEmpty($module_service->findByInterface(ModuleThemeInterface::class)->all());
- // THe core modules do not contain any of these.
- $this->assertEmpty($module_service->findByInterface(ModuleHistoricEventsInterface::class)->all());
- }
-
- /**
- * @covers \Fisharebest\Webtrees\Services\ModuleService::findByClass
- * @return void
- */
- public function testFindByClass(): void
- {
- app()->instance(Tree::class, Tree::create('name', 'title'));
-
- $module_service = new ModuleService();
-
- $this->assertNull($module_service->findByClass('not-a-valid-class-name'));
- $this->assertInstanceOf(TreesMenuModule::class, $module_service->findByClass(TreesMenuModule::class));
- }
-
- /**
- * @covers \Fisharebest\Webtrees\Services\ModuleService::findByName
- * @return void
- */
- public function testFindByName(): void
- {
- app()->instance(Tree::class, Tree::create('name', 'title'));
-
- $module_service = new ModuleService();
-
- $this->assertNull($module_service->findByName('not-a-valid-module-name'));
- $this->assertInstanceOf(TreesMenuModule::class, $module_service->findByName('trees-menu'));
+ // Search for an invalid module type
+ $this->assertNull($module_service->findByInterface('not-a-valid-class-or-interface'));
}
/**