From 62ff2f188c699b1144fb2ca2d6da1358d5e1a745 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Tue, 26 Mar 2024 12:20:49 +0000 Subject: PHPUnit 11 deprecates createStub() - use createMock() instead --- .../MatrilinealSurnameTraditionTest.php | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/app/SurnameTradition/MatrilinealSurnameTraditionTest.php') diff --git a/tests/app/SurnameTradition/MatrilinealSurnameTraditionTest.php b/tests/app/SurnameTradition/MatrilinealSurnameTraditionTest.php index 36c775d9a1..3b028770de 100644 --- a/tests/app/SurnameTradition/MatrilinealSurnameTraditionTest.php +++ b/tests/app/SurnameTradition/MatrilinealSurnameTraditionTest.php @@ -54,16 +54,16 @@ class MatrilinealSurnameTraditionTest extends TestCase */ public function testNewChildNames(): void { - $father_fact = $this->createStub(Fact::class); + $father_fact = $this->createMock(Fact::class); $father_fact->method('value')->willReturn('John /White/'); - $father = $this->createStub(Individual::class); + $father = $this->createMock(Individual::class); $father->method('facts')->willReturn(new Collection([$father_fact])); - $mother_fact = $this->createStub(Fact::class); + $mother_fact = $this->createMock(Fact::class); $mother_fact->method('value')->willReturn('Mary /Black/'); - $mother = $this->createStub(Individual::class); + $mother = $this->createMock(Individual::class); $mother->method('facts')->willReturn(new Collection([$mother_fact])); self::assertSame( @@ -87,16 +87,16 @@ class MatrilinealSurnameTraditionTest extends TestCase */ public function testNewChildNamesWithSpfx(): void { - $father_fact = $this->createStub(Fact::class); + $father_fact = $this->createMock(Fact::class); $father_fact->method('value')->willReturn('John /de White/'); - $father = $this->createStub(Individual::class); + $father = $this->createMock(Individual::class); $father->method('facts')->willReturn(new Collection([$father_fact])); - $mother_fact = $this->createStub(Fact::class); + $mother_fact = $this->createMock(Fact::class); $mother_fact->method('value')->willReturn('Mary /van Black/'); - $mother = $this->createStub(Individual::class); + $mother = $this->createMock(Individual::class); $mother->method('facts')->willReturn(new Collection([$mother_fact])); self::assertSame( @@ -121,10 +121,10 @@ class MatrilinealSurnameTraditionTest extends TestCase */ public function testNewParentNames(): void { - $fact = $this->createStub(Fact::class); + $fact = $this->createMock(Fact::class); $fact->method('value')->willReturn('Chris /White/'); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); $individual->method('facts')->willReturn(new Collection([$fact])); @@ -149,10 +149,10 @@ class MatrilinealSurnameTraditionTest extends TestCase */ public function testNewSpouseNames(): void { - $fact = $this->createStub(Fact::class); + $fact = $this->createMock(Fact::class); $fact->method('value')->willReturn('Chris /White/'); - $individual = $this->createStub(Individual::class); + $individual = $this->createMock(Individual::class); $individual->method('facts')->willReturn(new Collection([$fact])); self::assertSame( -- cgit v1.3