summaryrefslogtreecommitdiff
path: root/tests/app
diff options
context:
space:
mode:
Diffstat (limited to 'tests/app')
-rw-r--r--tests/app/Http/Middleware/HandleExceptionsTest.php7
-rw-r--r--tests/app/Module/AhnentafelReportModuleTest.php1
-rw-r--r--tests/app/Module/BirthDeathMarriageReportModuleTest.php1
-rw-r--r--tests/app/Module/BirthReportModuleTest.php1
-rw-r--r--tests/app/Module/CemeteryReportModuleTest.php1
-rw-r--r--tests/app/Module/ChangeReportModuleTest.php1
-rw-r--r--tests/app/Module/DeathReportModuleTest.php1
-rw-r--r--tests/app/Module/DescendancyReportModuleTest.php1
-rw-r--r--tests/app/Module/FactSourcesReportModuleTest.php1
-rw-r--r--tests/app/Module/FamilyGroupReportModuleTest.php1
-rw-r--r--tests/app/Module/IndividualFamiliesReportModuleTest.php1
-rw-r--r--tests/app/Module/IndividualReportModuleTest.php1
-rw-r--r--tests/app/Module/MarriageReportModuleTest.php1
-rw-r--r--tests/app/Module/MissingFactsReportModuleTest.php1
-rw-r--r--tests/app/Module/OccupationReportModuleTest.php1
-rw-r--r--tests/app/Module/PedigreeReportModuleTest.php1
-rw-r--r--tests/app/Module/RelatedIndividualsReportModuleTest.php1
-rw-r--r--tests/app/Services/ModuleServiceTest.php10
18 files changed, 1 insertions, 32 deletions
diff --git a/tests/app/Http/Middleware/HandleExceptionsTest.php b/tests/app/Http/Middleware/HandleExceptionsTest.php
index a2536546ea..a9228c85fd 100644
--- a/tests/app/Http/Middleware/HandleExceptionsTest.php
+++ b/tests/app/Http/Middleware/HandleExceptionsTest.php
@@ -50,13 +50,6 @@ class HandleExceptionsTest extends TestCase
$module_service->method('findByComponent')->willReturn(new Collection([]));
app()->instance(ModuleService::class, $module_service);
- $user_service = $this->createMock(UserService::class);
- app()->instance(UserService::class, $user_service);
-
- // The error response needs a tree.
- //$tree = $this->createMock(Tree::class);
- View::share('tree', null);
-
$request = self::createRequest();
$middleware = new HandleExceptions();
$response = $middleware->process($request, $handler);
diff --git a/tests/app/Module/AhnentafelReportModuleTest.php b/tests/app/Module/AhnentafelReportModuleTest.php
index 13cde61ba3..61ec633836 100644
--- a/tests/app/Module/AhnentafelReportModuleTest.php
+++ b/tests/app/Module/AhnentafelReportModuleTest.php
@@ -82,7 +82,6 @@ class AhnentafelReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/ahnentafel_report.xml';
$vars = [
'pid' => ['id' => 'X1030'],
diff --git a/tests/app/Module/BirthDeathMarriageReportModuleTest.php b/tests/app/Module/BirthDeathMarriageReportModuleTest.php
index 1b3a6aa219..9f9e0b029a 100644
--- a/tests/app/Module/BirthDeathMarriageReportModuleTest.php
+++ b/tests/app/Module/BirthDeathMarriageReportModuleTest.php
@@ -76,7 +76,6 @@ class BirthDeathMarriageReportModuleTest extends TestCase
public function testReportRunsWithoutError(): void
{
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/bdm_report.xml';
$vars = [
'name' => ['id' => ''],
diff --git a/tests/app/Module/BirthReportModuleTest.php b/tests/app/Module/BirthReportModuleTest.php
index 71f2f444aa..ea20670070 100644
--- a/tests/app/Module/BirthReportModuleTest.php
+++ b/tests/app/Module/BirthReportModuleTest.php
@@ -82,7 +82,6 @@ class BirthReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/birth_report.xml';
$vars = [
'name' => ['id' => ''],
diff --git a/tests/app/Module/CemeteryReportModuleTest.php b/tests/app/Module/CemeteryReportModuleTest.php
index dc13e07a24..558399fee2 100644
--- a/tests/app/Module/CemeteryReportModuleTest.php
+++ b/tests/app/Module/CemeteryReportModuleTest.php
@@ -82,7 +82,6 @@ class CemeteryReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/cemetery_report.xml';
$vars = [
'deathplace' => ['id' => ''],
diff --git a/tests/app/Module/ChangeReportModuleTest.php b/tests/app/Module/ChangeReportModuleTest.php
index 045b1899b1..cf130d0b63 100644
--- a/tests/app/Module/ChangeReportModuleTest.php
+++ b/tests/app/Module/ChangeReportModuleTest.php
@@ -83,7 +83,6 @@ class ChangeReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/change_report.xml';
$vars = [
'changeRangeStart' => ['id' => Carbon::now()->subMonths(1)->format('d M Y')],
diff --git a/tests/app/Module/DeathReportModuleTest.php b/tests/app/Module/DeathReportModuleTest.php
index 866f3981b7..9f6ab4fc78 100644
--- a/tests/app/Module/DeathReportModuleTest.php
+++ b/tests/app/Module/DeathReportModuleTest.php
@@ -82,7 +82,6 @@ class DeathReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/death_report.xml';
$vars = [
'name' => ['id' => ''],
diff --git a/tests/app/Module/DescendancyReportModuleTest.php b/tests/app/Module/DescendancyReportModuleTest.php
index f0f4d587b0..f156c57e6e 100644
--- a/tests/app/Module/DescendancyReportModuleTest.php
+++ b/tests/app/Module/DescendancyReportModuleTest.php
@@ -82,7 +82,6 @@ class DescendancyReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/descendancy_report.xml';
$vars = [
'pid' => ['id' => 'X1030'],
diff --git a/tests/app/Module/FactSourcesReportModuleTest.php b/tests/app/Module/FactSourcesReportModuleTest.php
index 24b0f66230..a3235b6fd9 100644
--- a/tests/app/Module/FactSourcesReportModuleTest.php
+++ b/tests/app/Module/FactSourcesReportModuleTest.php
@@ -82,7 +82,6 @@ class FactSourcesReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/fact_sources.xml';
$vars = [
'id' => ['id' => 's1'],
diff --git a/tests/app/Module/FamilyGroupReportModuleTest.php b/tests/app/Module/FamilyGroupReportModuleTest.php
index 32b243bc02..2584940949 100644
--- a/tests/app/Module/FamilyGroupReportModuleTest.php
+++ b/tests/app/Module/FamilyGroupReportModuleTest.php
@@ -82,7 +82,6 @@ class FamilyGroupReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/family_group_report.xml';
$vars = [
'id' => ['id' => 'f1'],
diff --git a/tests/app/Module/IndividualFamiliesReportModuleTest.php b/tests/app/Module/IndividualFamiliesReportModuleTest.php
index d6c1902b4b..03827e1e39 100644
--- a/tests/app/Module/IndividualFamiliesReportModuleTest.php
+++ b/tests/app/Module/IndividualFamiliesReportModuleTest.php
@@ -82,7 +82,6 @@ class IndividualFamiliesReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/individual_ext_report.xml';
$vars = [
'pid' => ['id' => 'X1030'],
diff --git a/tests/app/Module/IndividualReportModuleTest.php b/tests/app/Module/IndividualReportModuleTest.php
index d816572452..471c74ffb4 100644
--- a/tests/app/Module/IndividualReportModuleTest.php
+++ b/tests/app/Module/IndividualReportModuleTest.php
@@ -83,7 +83,6 @@ class IndividualReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/individual_report.xml';
$vars = [
'id' => ['id' => 'X1030'],
diff --git a/tests/app/Module/MarriageReportModuleTest.php b/tests/app/Module/MarriageReportModuleTest.php
index 4a796d18e3..c42d88c1f9 100644
--- a/tests/app/Module/MarriageReportModuleTest.php
+++ b/tests/app/Module/MarriageReportModuleTest.php
@@ -82,7 +82,6 @@ class MarriageReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/marriage_report.xml';
$vars = [
'name' => ['id' => ''],
diff --git a/tests/app/Module/MissingFactsReportModuleTest.php b/tests/app/Module/MissingFactsReportModuleTest.php
index 6dccf51a2b..1998ac8e14 100644
--- a/tests/app/Module/MissingFactsReportModuleTest.php
+++ b/tests/app/Module/MissingFactsReportModuleTest.php
@@ -82,7 +82,6 @@ class MissingFactsReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/missing_facts_report.xml';
$vars = [
'pid' => ['id' => 'X1030'],
diff --git a/tests/app/Module/OccupationReportModuleTest.php b/tests/app/Module/OccupationReportModuleTest.php
index 4e402ac4bf..85687c9aab 100644
--- a/tests/app/Module/OccupationReportModuleTest.php
+++ b/tests/app/Module/OccupationReportModuleTest.php
@@ -82,7 +82,6 @@ class OccupationReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/occupation_report.xml';
$vars = [
'occupation' => ['id' => 'king'],
diff --git a/tests/app/Module/PedigreeReportModuleTest.php b/tests/app/Module/PedigreeReportModuleTest.php
index 874039cd05..5432b6c44f 100644
--- a/tests/app/Module/PedigreeReportModuleTest.php
+++ b/tests/app/Module/PedigreeReportModuleTest.php
@@ -82,7 +82,6 @@ class PedigreeReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/pedigree_report.xml';
$vars = [
'pid' => ['id' => 'X1030'],
diff --git a/tests/app/Module/RelatedIndividualsReportModuleTest.php b/tests/app/Module/RelatedIndividualsReportModuleTest.php
index d064f7a30f..d34e8ae2c7 100644
--- a/tests/app/Module/RelatedIndividualsReportModuleTest.php
+++ b/tests/app/Module/RelatedIndividualsReportModuleTest.php
@@ -82,7 +82,6 @@ class RelatedIndividualsReportModuleTest extends TestCase
Auth::login($user);
$tree = $this->importTree('demo.ged');
- app()->instance(Tree::class, $tree);
$xml = Webtrees::ROOT_DIR . 'resources/xml/reports/relative_ext_report.xml';
$vars = [
'pid' => ['id' => 'X1030'],
diff --git a/tests/app/Services/ModuleServiceTest.php b/tests/app/Services/ModuleServiceTest.php
index 29ba1a16cf..a3f86e7257 100644
--- a/tests/app/Services/ModuleServiceTest.php
+++ b/tests/app/Services/ModuleServiceTest.php
@@ -51,8 +51,6 @@ class ModuleServiceTest extends TestCase
*/
public function testAll(): void
{
- app()->instance(Tree::class, Tree::create('name', 'title'));
-
$module_service = new ModuleService();
$this->assertNotEmpty($module_service->all());
@@ -67,9 +65,7 @@ class ModuleServiceTest extends TestCase
*/
public function testFindByComponent(): void
{
- $user_service = new UserService();
- app()->instance(Tree::class, Tree::create('name', 'title'));
-
+ $user_service = new UserService();
$module_service = new ModuleService();
$tree = $this->importTree('demo.ged');
@@ -89,8 +85,6 @@ class ModuleServiceTest extends TestCase
*/
public function testFindByInterface(): void
{
- app()->instance(Tree::class, Tree::create('name', 'title'));
-
$module_service = new ModuleService();
$this->assertNotEmpty($module_service->findByInterface(ModuleAnalyticsInterface::class, true)->all());
@@ -114,7 +108,6 @@ class ModuleServiceTest extends TestCase
*/
public function testOtherModules(): void
{
- app()->instance(Tree::class, Tree::create('name', 'title'));
DB::table('module')->insert(['module_name' => 'not-a-module']);
$module_service = new ModuleService();
@@ -128,7 +121,6 @@ class ModuleServiceTest extends TestCase
*/
public function testDeletedModules(): void
{
- app()->instance(Tree::class, Tree::create('name', 'title'));
DB::table('module')->insert(['module_name' => 'not-a-module']);
$module_service = new ModuleService();