diff options
Diffstat (limited to 'tests/app/Http')
36 files changed, 313 insertions, 313 deletions
diff --git a/tests/app/Http/RequestHandlers/AccountDeleteTest.php b/tests/app/Http/RequestHandlers/AccountDeleteTest.php index 4c342cfc76..b6e49c617d 100644 --- a/tests/app/Http/RequestHandlers/AccountDeleteTest.php +++ b/tests/app/Http/RequestHandlers/AccountDeleteTest.php @@ -30,7 +30,7 @@ class AccountDeleteTest extends TestCase { public function testHandler(): void { - $user_service = $this->createStub(UserService::class); + $user_service = $this->createMock(UserService::class); $request = self::createRequest(); diff --git a/tests/app/Http/RequestHandlers/AccountEditTest.php b/tests/app/Http/RequestHandlers/AccountEditTest.php index c9632f1a16..93f7847a08 100644 --- a/tests/app/Http/RequestHandlers/AccountEditTest.php +++ b/tests/app/Http/RequestHandlers/AccountEditTest.php @@ -35,9 +35,9 @@ class AccountEditTest extends TestCase public function testHandler(): void { - $user = $this->createStub(User::class); - $message_service = $this->createStub(MessageService::class); - $module_service = $this->createStub(ModuleService::class); + $user = $this->createMock(User::class); + $message_service = $this->createMock(MessageService::class); + $module_service = $this->createMock(ModuleService::class); $module_service->method('findByInterface')->willReturn(new Collection([])); diff --git a/tests/app/Http/RequestHandlers/BroadcastPageTest.php b/tests/app/Http/RequestHandlers/BroadcastPageTest.php index bb8d894366..651e164176 100644 --- a/tests/app/Http/RequestHandlers/BroadcastPageTest.php +++ b/tests/app/Http/RequestHandlers/BroadcastPageTest.php @@ -33,7 +33,7 @@ class BroadcastPageTest extends TestCase public function testMissingParameterTo(): void { - $message_service = $this->createStub(MessageService::class); + $message_service = $this->createMock(MessageService::class); $message_service->method('recipientTypes')->willReturn(['foo' => 'FOO']); $request = self::createRequest() @@ -47,7 +47,7 @@ class BroadcastPageTest extends TestCase } public function testHandler(): void { - $message_service = $this->createStub(MessageService::class); + $message_service = $this->createMock(MessageService::class); $message_service->method('recipientTypes')->willReturn(['foo' => 'FOO', 'bar' => 'BAR']); $message_service->method('recipientUsers')->willReturn(new Collection()); diff --git a/tests/app/Http/RequestHandlers/RedirectAncestryPhpTest.php b/tests/app/Http/RequestHandlers/RedirectAncestryPhpTest.php index c2a50d58a1..084f0f9340 100644 --- a/tests/app/Http/RequestHandlers/RedirectAncestryPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectAncestryPhpTest.php @@ -40,20 +40,20 @@ class RedirectAncestryPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectAncestryPhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(AncestorsChartModule::class); + $module = $this->createMock(AncestorsChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -90,15 +90,15 @@ class RedirectAncestryPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(AncestorsChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -118,16 +118,16 @@ class RedirectAncestryPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(AncestorsChartModule::class); + $module = $this->createMock(AncestorsChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(AncestorsChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectBranchesPhpTest.php b/tests/app/Http/RequestHandlers/RedirectBranchesPhpTest.php index 6975ed3141..521041ea7c 100644 --- a/tests/app/Http/RequestHandlers/RedirectBranchesPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectBranchesPhpTest.php @@ -37,20 +37,20 @@ class RedirectBranchesPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(BranchesListModule::class); + $module = $this->createMock(BranchesListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -78,15 +78,15 @@ class RedirectBranchesPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(BranchesListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -106,16 +106,16 @@ class RedirectBranchesPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(BranchesListModule::class); + $module = $this->createMock(BranchesListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(BranchesListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectCalendarPhpTest.php b/tests/app/Http/RequestHandlers/RedirectCalendarPhpTest.php index 77ead0f2b3..0d54371d33 100644 --- a/tests/app/Http/RequestHandlers/RedirectCalendarPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectCalendarPhpTest.php @@ -35,12 +35,12 @@ class RedirectCalendarPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -67,7 +67,7 @@ class RedirectCalendarPhpTest extends TestCase public function testNoSuchTree(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectCompactPhpTest.php b/tests/app/Http/RequestHandlers/RedirectCompactPhpTest.php index c694caaefa..5988355585 100644 --- a/tests/app/Http/RequestHandlers/RedirectCompactPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectCompactPhpTest.php @@ -40,20 +40,20 @@ class RedirectCompactPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectCompactPhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(CompactTreeChartModule::class); + $module = $this->createMock(CompactTreeChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -90,15 +90,15 @@ class RedirectCompactPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(CompactTreeChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -118,16 +118,16 @@ class RedirectCompactPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(CompactTreeChartModule::class); + $module = $this->createMock(CompactTreeChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(CompactTreeChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectDescendancyPhpTest.php b/tests/app/Http/RequestHandlers/RedirectDescendancyPhpTest.php index b2acc697f7..ef4a652794 100644 --- a/tests/app/Http/RequestHandlers/RedirectDescendancyPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectDescendancyPhpTest.php @@ -40,20 +40,20 @@ class RedirectDescendancyPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectDescendancyPhpTest extends TestCase Registry::individualFactory($individual_factory); - $descendancy_chart = $this->createStub(DescendancyChartModule::class); + $descendancy_chart = $this->createMock(DescendancyChartModule::class); $descendancy_chart ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -86,15 +86,15 @@ class RedirectDescendancyPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(DescendancyChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -114,16 +114,16 @@ class RedirectDescendancyPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(DescendancyChartModule::class); + $module = $this->createMock(DescendancyChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(DescendancyChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectFamListPhpTest.php b/tests/app/Http/RequestHandlers/RedirectFamListPhpTest.php index 29f21347ba..7344a5f829 100644 --- a/tests/app/Http/RequestHandlers/RedirectFamListPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectFamListPhpTest.php @@ -37,24 +37,24 @@ class RedirectFamListPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(FamilyListModule::class); + $module = $this->createMock(FamilyListModule::class); $module ->expects(self::once()) ->method('listUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectFamListPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(FamilyListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectFamListPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(FamilyListModule::class); + $module = $this->createMock(FamilyListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(FamilyListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectFamilyBookPhpTest.php b/tests/app/Http/RequestHandlers/RedirectFamilyBookPhpTest.php index 65dd0f9f87..d53df5b3da 100644 --- a/tests/app/Http/RequestHandlers/RedirectFamilyBookPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectFamilyBookPhpTest.php @@ -40,20 +40,20 @@ class RedirectFamilyBookPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectFamilyBookPhpTest extends TestCase Registry::individualFactory($individual_factory); - $Compact_chart = $this->createStub(FamilyBookChartModule::class); + $Compact_chart = $this->createMock(FamilyBookChartModule::class); $Compact_chart ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -86,15 +86,15 @@ class RedirectFamilyBookPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(FamilyBookChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -113,16 +113,16 @@ class RedirectFamilyBookPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(FamilyBookChartModule::class); + $module = $this->createMock(FamilyBookChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(FamilyBookChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectFamilyPhpTest.php b/tests/app/Http/RequestHandlers/RedirectFamilyPhpTest.php index 0ffa0de758..a45ae0c374 100644 --- a/tests/app/Http/RequestHandlers/RedirectFamilyPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectFamilyPhpTest.php @@ -39,23 +39,23 @@ class RedirectFamilyPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $family = $this->createStub(Family::class); + $family = $this->createMock(Family::class); $family ->method('url') ->willReturn('https://www.example.com'); - $family_factory = $this->createStub(FamilyFactory::class); + $family_factory = $this->createMock(FamilyFactory::class); $family_factory ->expects(self::once()) ->method('make') @@ -79,9 +79,9 @@ class RedirectFamilyPhpTest extends TestCase public function testNoSuchRecord(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -101,7 +101,7 @@ class RedirectFamilyPhpTest extends TestCase public function testMissingXrefParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectFamilyPhp($tree_service); diff --git a/tests/app/Http/RequestHandlers/RedirectFanChartPhpTest.php b/tests/app/Http/RequestHandlers/RedirectFanChartPhpTest.php index d623dac2a2..6cf2de364f 100644 --- a/tests/app/Http/RequestHandlers/RedirectFanChartPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectFanChartPhpTest.php @@ -40,20 +40,20 @@ class RedirectFanChartPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectFanChartPhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(FanChartModule::class); + $module = $this->createMock(FanChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -90,15 +90,15 @@ class RedirectFanChartPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(FanChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -118,16 +118,16 @@ class RedirectFanChartPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(FanChartModule::class); + $module = $this->createMock(FanChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(FanChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectGedRecordPhpTest.php b/tests/app/Http/RequestHandlers/RedirectGedRecordPhpTest.php index 3958e40640..f96446b85b 100644 --- a/tests/app/Http/RequestHandlers/RedirectGedRecordPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectGedRecordPhpTest.php @@ -39,23 +39,23 @@ class RedirectGedRecordPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $gedcom_record = $this->createStub(GedcomRecord::class); + $gedcom_record = $this->createMock(GedcomRecord::class); $gedcom_record ->method('url') ->willReturn('https://www.example.com'); - $gedcom_record_factory = $this->createStub(GedcomRecordFactory::class); + $gedcom_record_factory = $this->createMock(GedcomRecordFactory::class); $gedcom_record_factory ->expects(self::once()) ->method('make') @@ -79,9 +79,9 @@ class RedirectGedRecordPhpTest extends TestCase public function testNoSuchRecord(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -101,7 +101,7 @@ class RedirectGedRecordPhpTest extends TestCase public function testMissingXrefParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectGedRecordPhp($tree_service); diff --git a/tests/app/Http/RequestHandlers/RedirectHourGlassPhpTest.php b/tests/app/Http/RequestHandlers/RedirectHourGlassPhpTest.php index 9630f915ec..896f1ce824 100644 --- a/tests/app/Http/RequestHandlers/RedirectHourGlassPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectHourGlassPhpTest.php @@ -40,20 +40,20 @@ class RedirectHourGlassPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectHourGlassPhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(HourglassChartModule::class); + $module = $this->createMock(HourglassChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -90,15 +90,15 @@ class RedirectHourGlassPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(HourglassChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -118,16 +118,16 @@ class RedirectHourGlassPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(HourglassChartModule::class); + $module = $this->createMock(HourglassChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(HourglassChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectIndiListPhpTest.php b/tests/app/Http/RequestHandlers/RedirectIndiListPhpTest.php index 6b3102bdad..db56286e7c 100644 --- a/tests/app/Http/RequestHandlers/RedirectIndiListPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectIndiListPhpTest.php @@ -37,24 +37,24 @@ class RedirectIndiListPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(IndividualListModule::class); + $module = $this->createMock(IndividualListModule::class); $module ->expects(self::once()) ->method('listUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectIndiListPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(IndividualListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectIndiListPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(IndividualListModule::class); + $module = $this->createMock(IndividualListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(IndividualListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectIndividualPhpTest.php b/tests/app/Http/RequestHandlers/RedirectIndividualPhpTest.php index 3bb2d78fea..eb205f50a5 100644 --- a/tests/app/Http/RequestHandlers/RedirectIndividualPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectIndividualPhpTest.php @@ -39,23 +39,23 @@ class RedirectIndividualPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); $individual ->method('url') ->willReturn('https://www.example.com'); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -79,9 +79,9 @@ class RedirectIndividualPhpTest extends TestCase public function testNoSuchRecord(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -101,7 +101,7 @@ class RedirectIndividualPhpTest extends TestCase public function testNoSuchTree(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -121,7 +121,7 @@ class RedirectIndividualPhpTest extends TestCase public function testMissingXrefParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectFamilyPhp($tree_service); diff --git a/tests/app/Http/RequestHandlers/RedirectLifeSpanPhpTest.php b/tests/app/Http/RequestHandlers/RedirectLifeSpanPhpTest.php index fd330b96d7..a5371e4224 100644 --- a/tests/app/Http/RequestHandlers/RedirectLifeSpanPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectLifeSpanPhpTest.php @@ -37,24 +37,24 @@ class RedirectLifeSpanPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(LifespansChartModule::class); + $module = $this->createMock(LifespansChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -76,15 +76,15 @@ class RedirectLifeSpanPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(LifespansChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -104,16 +104,16 @@ class RedirectLifeSpanPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(LifespansChartModule::class); + $module = $this->createMock(LifespansChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(LifespansChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectMediaListPhpTest.php b/tests/app/Http/RequestHandlers/RedirectMediaListPhpTest.php index 2f19e01309..ec6f0b0b34 100644 --- a/tests/app/Http/RequestHandlers/RedirectMediaListPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectMediaListPhpTest.php @@ -37,24 +37,24 @@ class RedirectMediaListPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(MediaListModule::class); + $module = $this->createMock(MediaListModule::class); $module ->expects(self::once()) ->method('listUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectMediaListPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(MediaListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectMediaListPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(MediaListModule::class); + $module = $this->createMock(MediaListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(MediaListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectMediaViewerPhpTest.php b/tests/app/Http/RequestHandlers/RedirectMediaViewerPhpTest.php index 976ccca6e4..269e361d66 100644 --- a/tests/app/Http/RequestHandlers/RedirectMediaViewerPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectMediaViewerPhpTest.php @@ -39,23 +39,23 @@ class RedirectMediaViewerPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $media = $this->createStub(Media::class); + $media = $this->createMock(Media::class); $media ->method('url') ->willReturn('https://www.example.com'); - $media_factory = $this->createStub(MediaFactory::class); + $media_factory = $this->createMock(MediaFactory::class); $media_factory ->expects(self::once()) ->method('make') @@ -79,9 +79,9 @@ class RedirectMediaViewerPhpTest extends TestCase public function testNoSuchRecord(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -101,7 +101,7 @@ class RedirectMediaViewerPhpTest extends TestCase public function testNoSuchTree(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -121,7 +121,7 @@ class RedirectMediaViewerPhpTest extends TestCase public function testMissingTreeParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectFamilyPhp($tree_service); @@ -134,7 +134,7 @@ class RedirectMediaViewerPhpTest extends TestCase public function testMissingXrefParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectFamilyPhp($tree_service); diff --git a/tests/app/Http/RequestHandlers/RedirectModulePhpTest.php b/tests/app/Http/RequestHandlers/RedirectModulePhpTest.php index 926d8fe7c1..8c324f021a 100644 --- a/tests/app/Http/RequestHandlers/RedirectModulePhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectModulePhpTest.php @@ -41,20 +41,20 @@ class RedirectModulePhpTest extends TestCase public function testRedirectPedigreeMap(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -63,13 +63,13 @@ class RedirectModulePhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(PedigreeMapModule::class); + $module = $this->createMock(PedigreeMapModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -91,20 +91,20 @@ class RedirectModulePhpTest extends TestCase public function testRedirectInteractiveTree(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -113,13 +113,13 @@ class RedirectModulePhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(InteractiveTreeModule::class); + $module = $this->createMock(InteractiveTreeModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -142,8 +142,8 @@ class RedirectModulePhpTest extends TestCase public function testNoSuchTree(): void { - $module_service = $this->createStub(ModuleService::class); - $tree_service = $this->createStub(TreeService::class); + $module_service = $this->createMock(ModuleService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -163,12 +163,12 @@ class RedirectModulePhpTest extends TestCase public function testNoSuchIndividual(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -176,8 +176,8 @@ class RedirectModulePhpTest extends TestCase ->willReturn(null); Registry::individualFactory($individual_factory); - $module_service = $this->createStub(ModuleService::class); - $tree_service = $this->createStub(TreeService::class); + $module_service = $this->createMock(ModuleService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -197,20 +197,20 @@ class RedirectModulePhpTest extends TestCase public function testPedigreeMapModuleDisabled(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -219,7 +219,7 @@ class RedirectModulePhpTest extends TestCase Registry::individualFactory($individual_factory); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -240,20 +240,20 @@ class RedirectModulePhpTest extends TestCase public function testInteractiveTreeModuleDisabled(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -262,7 +262,7 @@ class RedirectModulePhpTest extends TestCase Registry::individualFactory($individual_factory); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') diff --git a/tests/app/Http/RequestHandlers/RedirectNoteListPhpTest.php b/tests/app/Http/RequestHandlers/RedirectNoteListPhpTest.php index 85311c93f6..a550135eb9 100644 --- a/tests/app/Http/RequestHandlers/RedirectNoteListPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectNoteListPhpTest.php @@ -37,24 +37,24 @@ class RedirectNoteListPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(NoteListModule::class); + $module = $this->createMock(NoteListModule::class); $module ->expects(self::once()) ->method('listUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectNoteListPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(NoteListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectNoteListPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(NoteListModule::class); + $module = $this->createMock(NoteListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(NoteListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectNotePhpTest.php b/tests/app/Http/RequestHandlers/RedirectNotePhpTest.php index 0a045e5c2d..3e4b3ad582 100644 --- a/tests/app/Http/RequestHandlers/RedirectNotePhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectNotePhpTest.php @@ -39,23 +39,23 @@ class RedirectNotePhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $note = $this->createStub(Note::class); + $note = $this->createMock(Note::class); $note ->method('url') ->willReturn('https://www.example.com'); - $note_factory = $this->createStub(NoteFactory::class); + $note_factory = $this->createMock(NoteFactory::class); $note_factory ->expects(self::once()) ->method('make') @@ -79,9 +79,9 @@ class RedirectNotePhpTest extends TestCase public function testNoSuchRecord(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -101,7 +101,7 @@ class RedirectNotePhpTest extends TestCase public function testMissingXrefParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectNotePhp($tree_service); diff --git a/tests/app/Http/RequestHandlers/RedirectPedigreePhpTest.php b/tests/app/Http/RequestHandlers/RedirectPedigreePhpTest.php index c2413cfe6e..356fd787cd 100644 --- a/tests/app/Http/RequestHandlers/RedirectPedigreePhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectPedigreePhpTest.php @@ -40,20 +40,20 @@ class RedirectPedigreePhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectPedigreePhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(PedigreeChartModule::class); + $module = $this->createMock(PedigreeChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -90,15 +90,15 @@ class RedirectPedigreePhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(PedigreeChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -118,16 +118,16 @@ class RedirectPedigreePhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(PedigreeChartModule::class); + $module = $this->createMock(PedigreeChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(PedigreeChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectPlaceListPhpTest.php b/tests/app/Http/RequestHandlers/RedirectPlaceListPhpTest.php index 123e1aba18..5afda3237b 100644 --- a/tests/app/Http/RequestHandlers/RedirectPlaceListPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectPlaceListPhpTest.php @@ -37,24 +37,24 @@ class RedirectPlaceListPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(PlaceHierarchyListModule::class); + $module = $this->createMock(PlaceHierarchyListModule::class); $module ->expects(self::once()) ->method('listUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectPlaceListPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(PlaceHierarchyListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectPlaceListPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(PlaceHierarchyListModule::class); + $module = $this->createMock(PlaceHierarchyListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(PlaceHierarchyListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectRelationshipPhpTest.php b/tests/app/Http/RequestHandlers/RedirectRelationshipPhpTest.php index aee8966506..d7154afa35 100644 --- a/tests/app/Http/RequestHandlers/RedirectRelationshipPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectRelationshipPhpTest.php @@ -40,20 +40,20 @@ class RedirectRelationshipPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectRelationshipPhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(RelationshipsChartModule::class); + $module = $this->createMock(RelationshipsChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -90,15 +90,15 @@ class RedirectRelationshipPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(RelationshipsChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -118,16 +118,16 @@ class RedirectRelationshipPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(RelationshipsChartModule::class); + $module = $this->createMock(RelationshipsChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(RelationshipsChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectRepoListPhpTest.php b/tests/app/Http/RequestHandlers/RedirectRepoListPhpTest.php index e9a4ecbbe5..10a7c52e44 100644 --- a/tests/app/Http/RequestHandlers/RedirectRepoListPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectRepoListPhpTest.php @@ -37,24 +37,24 @@ class RedirectRepoListPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(RepositoryListModule::class); + $module = $this->createMock(RepositoryListModule::class); $module ->expects(self::once()) ->method('listUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectRepoListPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(RepositoryListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectRepoListPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(RepositoryListModule::class); + $module = $this->createMock(RepositoryListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(RepositoryListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectReportEnginePhpTest.php b/tests/app/Http/RequestHandlers/RedirectReportEnginePhpTest.php index 137df75569..399c9b4f4b 100644 --- a/tests/app/Http/RequestHandlers/RedirectReportEnginePhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectReportEnginePhpTest.php @@ -35,12 +35,12 @@ class RedirectReportEnginePhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -67,7 +67,7 @@ class RedirectReportEnginePhpTest extends TestCase public function testNoSuchTree(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectRepositoryPhpTest.php b/tests/app/Http/RequestHandlers/RedirectRepositoryPhpTest.php index 425aa5ae12..bfd2450663 100644 --- a/tests/app/Http/RequestHandlers/RedirectRepositoryPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectRepositoryPhpTest.php @@ -39,23 +39,23 @@ class RedirectRepositoryPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $repository = $this->createStub(Repository::class); + $repository = $this->createMock(Repository::class); $repository ->method('url') ->willReturn('https://www.example.com'); - $repository_factory = $this->createStub(RepositoryFactory::class); + $repository_factory = $this->createMock(RepositoryFactory::class); $repository_factory ->expects(self::once()) ->method('make') @@ -79,9 +79,9 @@ class RedirectRepositoryPhpTest extends TestCase public function testNoSuchRecord(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -101,7 +101,7 @@ class RedirectRepositoryPhpTest extends TestCase public function testMissingXrefParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectRepositoryPhp($tree_service); diff --git a/tests/app/Http/RequestHandlers/RedirectSourceListPhpTest.php b/tests/app/Http/RequestHandlers/RedirectSourceListPhpTest.php index a9cfae9f6c..5bcc1de965 100644 --- a/tests/app/Http/RequestHandlers/RedirectSourceListPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectSourceListPhpTest.php @@ -37,24 +37,24 @@ class RedirectSourceListPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(SourceListModule::class); + $module = $this->createMock(SourceListModule::class); $module ->expects(self::once()) ->method('listUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectSourceListPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(SourceListModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectSourceListPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(SourceListModule::class); + $module = $this->createMock(SourceListModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(SourceListModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectSourcePhpTest.php b/tests/app/Http/RequestHandlers/RedirectSourcePhpTest.php index d6c40d1325..4dc2b8c94f 100644 --- a/tests/app/Http/RequestHandlers/RedirectSourcePhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectSourcePhpTest.php @@ -39,23 +39,23 @@ class RedirectSourcePhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $source = $this->createStub(Source::class); + $source = $this->createMock(Source::class); $source ->method('url') ->willReturn('https://www.example.com'); - $source_factory = $this->createStub(SourceFactory::class); + $source_factory = $this->createMock(SourceFactory::class); $source_factory ->expects(self::once()) ->method('make') @@ -79,9 +79,9 @@ class RedirectSourcePhpTest extends TestCase public function testNoSuchRecord(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -101,7 +101,7 @@ class RedirectSourcePhpTest extends TestCase public function testMissingXrefParameter(): void { - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $handler = new RedirectSourcePhp($tree_service); diff --git a/tests/app/Http/RequestHandlers/RedirectStatisticsPhpTest.php b/tests/app/Http/RequestHandlers/RedirectStatisticsPhpTest.php index 796fd56d70..14aa742f00 100644 --- a/tests/app/Http/RequestHandlers/RedirectStatisticsPhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectStatisticsPhpTest.php @@ -37,24 +37,24 @@ class RedirectStatisticsPhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $module = $this->createStub(StatisticsChartModule::class); + $module = $this->createMock(StatisticsChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -73,15 +73,15 @@ class RedirectStatisticsPhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(StatisticsChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -98,16 +98,16 @@ class RedirectStatisticsPhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(StatisticsChartModule::class); + $module = $this->createMock(StatisticsChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(StatisticsChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/RedirectTimeLinePhpTest.php b/tests/app/Http/RequestHandlers/RedirectTimeLinePhpTest.php index 96b23fc664..ee3440622b 100644 --- a/tests/app/Http/RequestHandlers/RedirectTimeLinePhpTest.php +++ b/tests/app/Http/RequestHandlers/RedirectTimeLinePhpTest.php @@ -40,20 +40,20 @@ class RedirectTimeLinePhpTest extends TestCase public function testRedirect(): void { - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); $tree ->method('name') ->willReturn('tree1'); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') ->willReturn(new Collection(['tree1' => $tree])); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); - $individual_factory = $this->createStub(IndividualFactory::class); + $individual_factory = $this->createMock(IndividualFactory::class); $individual_factory ->expects(self::once()) ->method('make') @@ -62,13 +62,13 @@ class RedirectTimeLinePhpTest extends TestCase Registry::individualFactory($individual_factory); - $module = $this->createStub(TimelineChartModule::class); + $module = $this->createMock(TimelineChartModule::class); $module ->expects(self::once()) ->method('chartUrl') ->willReturn('https://www.example.com'); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') @@ -90,15 +90,15 @@ class RedirectTimeLinePhpTest extends TestCase public function testModuleDisabled(): void { - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once())->method('findByInterface') ->with(TimelineChartModule::class) ->willReturn(new Collection()); - $tree = $this->createStub(Tree::class); + $tree = $this->createMock(Tree::class); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') @@ -118,16 +118,16 @@ class RedirectTimeLinePhpTest extends TestCase public function testNoSuchTree(): void { - $module = $this->createStub(TimelineChartModule::class); + $module = $this->createMock(TimelineChartModule::class); - $module_service = $this->createStub(ModuleService::class); + $module_service = $this->createMock(ModuleService::class); $module_service ->expects(self::once()) ->method('findByInterface') ->with(TimelineChartModule::class) ->willReturn(new Collection([$module])); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service ->expects(self::once()) ->method('all') diff --git a/tests/app/Http/RequestHandlers/SiteLogsDataTest.php b/tests/app/Http/RequestHandlers/SiteLogsDataTest.php index bd99b3f317..dae01c17f5 100644 --- a/tests/app/Http/RequestHandlers/SiteLogsDataTest.php +++ b/tests/app/Http/RequestHandlers/SiteLogsDataTest.php @@ -38,15 +38,15 @@ class SiteLogsDataTest extends TestCase ['tree' => 'a', 'from' => 'b', 'to' => 'c', 'type' => 'd', 'text' => 'e', 'ip' => 'f', 'username' => 'g'] ); - $query = $this->createStub(Builder::class); + $query = $this->createMock(Builder::class); - $site_logs_service = $this->createStub(SiteLogsService::class); + $site_logs_service = $this->createMock(SiteLogsService::class); $site_logs_service->method('logsQuery')->willReturn($query); - $response = $this->createStub(ResponseInterface::class); + $response = $this->createMock(ResponseInterface::class); $response->method('getStatusCode')->willReturn(StatusCodeInterface::STATUS_OK); - $data_tables_service = $this->createStub(DatatablesService::class); + $data_tables_service = $this->createMock(DatatablesService::class); $data_tables_service->method('handleQuery')->willReturn($response); $handler = new SiteLogsData($data_tables_service, $site_logs_service); diff --git a/tests/app/Http/RequestHandlers/SiteLogsDeleteTest.php b/tests/app/Http/RequestHandlers/SiteLogsDeleteTest.php index 49a331ad47..29b7403113 100644 --- a/tests/app/Http/RequestHandlers/SiteLogsDeleteTest.php +++ b/tests/app/Http/RequestHandlers/SiteLogsDeleteTest.php @@ -32,10 +32,10 @@ class SiteLogsDeleteTest extends TestCase { $request = self::createRequest(); - $query = $this->createStub(Builder::class); + $query = $this->createMock(Builder::class); $query->method('delete'); - $site_logs_service = $this->createStub(SiteLogsService::class); + $site_logs_service = $this->createMock(SiteLogsService::class); $site_logs_service->method('logsQuery')->willReturn($query); $handler = new SiteLogsDelete($site_logs_service); diff --git a/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php b/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php index d33d76892c..e167bfa344 100644 --- a/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php +++ b/tests/app/Http/RequestHandlers/SiteLogsDownloadTest.php @@ -33,16 +33,16 @@ class SiteLogsDownloadTest extends TestCase { $request = self::createRequest(); - $query1 = $this->createStub(Builder::class); - $query2 = $this->createStub(Builder::class); - $rows1 = $this->createStub(Collection::class); - $rows2 = $this->createStub(Collection::class); + $query1 = $this->createMock(Builder::class); + $query2 = $this->createMock(Builder::class); + $rows1 = $this->createMock(Collection::class); + $rows2 = $this->createMock(Collection::class); $query1->method('orderBy')->willReturn($query2); $query2->method('get')->willReturn($rows1); $rows1->method('map')->willReturn($rows2); $rows2->method('implode')->willReturn('foo,bar'); - $site_logs_service = $this->createStub(SiteLogsService::class); + $site_logs_service = $this->createMock(SiteLogsService::class); $site_logs_service->method('logsQuery')->willReturn($query1); $handler = new SiteLogsDownload($site_logs_service); diff --git a/tests/app/Http/RequestHandlers/SiteLogsPageTest.php b/tests/app/Http/RequestHandlers/SiteLogsPageTest.php index 79d040612f..62c2974c41 100644 --- a/tests/app/Http/RequestHandlers/SiteLogsPageTest.php +++ b/tests/app/Http/RequestHandlers/SiteLogsPageTest.php @@ -35,10 +35,10 @@ class SiteLogsPageTest extends TestCase { $request = self::createRequest(); - $tree_service = $this->createStub(TreeService::class); + $tree_service = $this->createMock(TreeService::class); $tree_service->method('all')->willReturn(new Collection()); - $user_service = $this->createStub(UserService::class); + $user_service = $this->createMock(UserService::class); $user_service->method('all')->willReturn(new Collection()); $handler = new SiteLogsPage($tree_service, $user_service); |
