summaryrefslogtreecommitdiff
path: root/tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php
diff options
context:
space:
mode:
authorGreg Roach <greg@subaqua.co.uk>2024-03-26 12:20:49 +0000
committerGreg Roach <greg@subaqua.co.uk>2024-03-31 17:33:17 +0100
commit62ff2f188c699b1144fb2ca2d6da1358d5e1a745 (patch)
treed6024ac95536795bc85e1ea6e83434963761feaf /tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php
parent234e0863a607ff8e5f8e78a7fefe5366f39f8ebf (diff)
downloadwebtrees-62ff2f188c699b1144fb2ca2d6da1358d5e1a745.tar.gz
webtrees-62ff2f188c699b1144fb2ca2d6da1358d5e1a745.tar.bz2
webtrees-62ff2f188c699b1144fb2ca2d6da1358d5e1a745.zip
PHPUnit 11 deprecates createStub() - use createMock() instead
Diffstat (limited to 'tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php')
-rw-r--r--tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php92
1 files changed, 46 insertions, 46 deletions
diff --git a/tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php b/tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php
index 42e57ce19f..2ceae7cca9 100644
--- a/tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php
@@ -55,16 +55,16 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewSonNames(): 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(
@@ -78,16 +78,16 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewDaughterNames(): 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(
@@ -101,16 +101,16 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewDaughterNamesInflected(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /Whita/');
- $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(
@@ -118,10 +118,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newChildNames($father, $mother, 'F')
);
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /Whitas/');
- $father = $this->createStub(Individual::class);
+ $father = $this->createMock(Individual::class);
$father->method('facts')->willReturn(new Collection([$father_fact]));
self::assertSame(
@@ -129,10 +129,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newChildNames($father, $mother, 'F')
);
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /Whitis/');
- $father = $this->createStub(Individual::class);
+ $father = $this->createMock(Individual::class);
$father->method('facts')->willReturn(new Collection([$father_fact]));
self::assertSame(
@@ -140,10 +140,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newChildNames($father, $mother, 'F')
);
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /Whitys/');
- $father = $this->createStub(Individual::class);
+ $father = $this->createMock(Individual::class);
$father->method('facts')->willReturn(new Collection([$father_fact]));
self::assertSame(
@@ -151,10 +151,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newChildNames($father, $mother, 'F')
);
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /Whitius/');
- $father = $this->createStub(Individual::class);
+ $father = $this->createMock(Individual::class);
$father->method('facts')->willReturn(new Collection([$father_fact]));
self::assertSame(
@@ -162,10 +162,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newChildNames($father, $mother, 'F')
);
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /Whitus/');
- $father = $this->createStub(Individual::class);
+ $father = $this->createMock(Individual::class);
$father->method('facts')->willReturn(new Collection([$father_fact]));
self::assertSame(
@@ -179,16 +179,16 @@ class LithuanianSurnameTraditionTest 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(
@@ -213,10 +213,10 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewFatherNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('John /White/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -230,10 +230,10 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewFatherNamesInflected(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Mary /Whitaitė/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -241,10 +241,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newParentNames($individual, 'M')
);
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Mary /Whitytė/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -252,10 +252,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newParentNames($individual, 'M')
);
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Mary /Whitiūtė/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -263,10 +263,10 @@ class LithuanianSurnameTraditionTest extends TestCase
$this->surname_tradition->newParentNames($individual, 'M')
);
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Mary /Whitutė/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -280,10 +280,10 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewMotherNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('John /White/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -297,10 +297,10 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewParentNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('John /White/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -314,10 +314,10 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewHusbandNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Mary /Black/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -331,10 +331,10 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewWifeNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('John /White/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -348,10 +348,10 @@ class LithuanianSurnameTraditionTest extends TestCase
*/
public function testNewSpouseNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('John /White/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(