summaryrefslogtreecommitdiff
path: root/tests/app/SurnameTradition
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
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')
-rw-r--r--tests/app/SurnameTradition/DefaultSurnameTraditionTest.php16
-rw-r--r--tests/app/SurnameTradition/IcelandicSurnameTraditionTest.php40
-rw-r--r--tests/app/SurnameTradition/LithuanianSurnameTraditionTest.php92
-rw-r--r--tests/app/SurnameTradition/MatrilinealSurnameTraditionTest.php24
-rw-r--r--tests/app/SurnameTradition/PaternalSurnameTraditionTest.php68
-rw-r--r--tests/app/SurnameTradition/PatrilinealSurnameTraditionTest.php24
-rw-r--r--tests/app/SurnameTradition/PolishSurnameTraditionTest.php88
-rw-r--r--tests/app/SurnameTradition/PortugueseSurnameTraditionTest.php24
-rw-r--r--tests/app/SurnameTradition/SpanishSurnameTraditionTest.php24
9 files changed, 200 insertions, 200 deletions
diff --git a/tests/app/SurnameTradition/DefaultSurnameTraditionTest.php b/tests/app/SurnameTradition/DefaultSurnameTraditionTest.php
index 1915c076f4..7ccf2e1189 100644
--- a/tests/app/SurnameTradition/DefaultSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/DefaultSurnameTraditionTest.php
@@ -44,16 +44,16 @@ class DefaultSurnameTraditionTest extends TestCase
*/
public function testNewChildNames(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Chris /White/');
- $father = $this->createStub(Individual::class);
+ $father = $this->createMock(Individual::class);
$father->method('facts')->willReturn(new Collection([$father]));
- $mother_fact = $this->createStub(Fact::class);
+ $mother_fact = $this->createMock(Fact::class);
$mother_fact->method('value')->willReturn('Chris /White/');
- $mother = $this->createStub(Individual::class);
+ $mother = $this->createMock(Individual::class);
$mother->method('facts')->willReturn(new Collection([$mother_fact]));
self::assertSame(
@@ -77,10 +77,10 @@ class DefaultSurnameTraditionTest 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]));
self::assertSame(
@@ -104,10 +104,10 @@ class DefaultSurnameTraditionTest 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(
diff --git a/tests/app/SurnameTradition/IcelandicSurnameTraditionTest.php b/tests/app/SurnameTradition/IcelandicSurnameTraditionTest.php
index 9758db5186..c82ec8306b 100644
--- a/tests/app/SurnameTradition/IcelandicSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/IcelandicSurnameTraditionTest.php
@@ -44,16 +44,16 @@ class IcelandicSurnameTraditionTest extends TestCase
*/
public function testNewSonNames(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Jon Einarsson');
- $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('Eva Stefansdottir');
- $mother = $this->createStub(Individual::class);
+ $mother = $this->createMock(Individual::class);
$mother->method('facts')->willReturn(new Collection([$mother_fact]));
self::assertSame(
@@ -67,16 +67,16 @@ class IcelandicSurnameTraditionTest extends TestCase
*/
public function testNewDaughterNames(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Jon Einarsson');
- $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('Eva Stefansdottir');
- $mother = $this->createStub(Individual::class);
+ $mother = $this->createMock(Individual::class);
$mother->method('facts')->willReturn(new Collection([$mother_fact]));
self::assertSame(
@@ -90,16 +90,16 @@ class IcelandicSurnameTraditionTest extends TestCase
*/
public function testNewChildNames(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Jon Einarsson');
- $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('Eva Stefansdottir');
- $mother = $this->createStub(Individual::class);
+ $mother = $this->createMock(Individual::class);
$mother->method('facts')->willReturn(new Collection([$mother_fact]));
self::assertSame(
@@ -113,10 +113,10 @@ class IcelandicSurnameTraditionTest extends TestCase
*/
public function testNewFatherNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Jon Einarsson');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -130,10 +130,10 @@ class IcelandicSurnameTraditionTest extends TestCase
*/
public function testNewMotherNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Jon Evasdottir');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -147,10 +147,10 @@ class IcelandicSurnameTraditionTest extends TestCase
*/
public function testNewParentNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Jon Einarsson');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -164,10 +164,10 @@ class IcelandicSurnameTraditionTest extends TestCase
*/
public function testNewSpouseNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Jon Einarsson');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
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(
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(
diff --git a/tests/app/SurnameTradition/PaternalSurnameTraditionTest.php b/tests/app/SurnameTradition/PaternalSurnameTraditionTest.php
index 7e4949dd37..ea5415c969 100644
--- a/tests/app/SurnameTradition/PaternalSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/PaternalSurnameTraditionTest.php
@@ -44,16 +44,16 @@ class PaternalSurnameTraditionTest 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(
@@ -77,16 +77,16 @@ class PaternalSurnameTraditionTest 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(
@@ -100,16 +100,16 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewChildNamesWithMultipleSpfx(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /van der 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(
@@ -123,16 +123,16 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewChildNamesWithDutchSpfx(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /\'t 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(
@@ -146,16 +146,16 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewChildNamesWithMultipleDutchSpfx(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /van \'t 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(
@@ -169,10 +169,10 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewFatherNames(): 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(
@@ -186,10 +186,10 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewMotherNames(): 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(
@@ -203,10 +203,10 @@ class PaternalSurnameTraditionTest 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]));
self::assertSame(
@@ -220,10 +220,10 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewHusbandNames(): 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(
@@ -237,10 +237,10 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewWifeNames(): 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(
@@ -254,10 +254,10 @@ class PaternalSurnameTraditionTest extends TestCase
*/
public function testNewWifeNamesWithSpfx(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Chris /van der White/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -271,10 +271,10 @@ class PaternalSurnameTraditionTest 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(
diff --git a/tests/app/SurnameTradition/PatrilinealSurnameTraditionTest.php b/tests/app/SurnameTradition/PatrilinealSurnameTraditionTest.php
index 6bf573c053..818cc03094 100644
--- a/tests/app/SurnameTradition/PatrilinealSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/PatrilinealSurnameTraditionTest.php
@@ -54,16 +54,16 @@ class PatrilinealSurnameTraditionTest 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 PatrilinealSurnameTraditionTest 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 PatrilinealSurnameTraditionTest 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]));
self::assertSame(
@@ -148,10 +148,10 @@ class PatrilinealSurnameTraditionTest 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(
diff --git a/tests/app/SurnameTradition/PolishSurnameTraditionTest.php b/tests/app/SurnameTradition/PolishSurnameTraditionTest.php
index 7bbc701e10..eb25f62a4d 100644
--- a/tests/app/SurnameTradition/PolishSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/PolishSurnameTraditionTest.php
@@ -45,16 +45,16 @@ class PolishSurnameTraditionTest 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(
@@ -68,16 +68,16 @@ class PolishSurnameTraditionTest 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(
@@ -91,16 +91,16 @@ class PolishSurnameTraditionTest extends TestCase
*/
public function testNewDaughterNamesInflected(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('John /Whitecki/');
- $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(
@@ -108,16 +108,16 @@ class PolishSurnameTraditionTest 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 /Whitedzki/');
- $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(
@@ -125,16 +125,16 @@ class PolishSurnameTraditionTest 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 /Whiteski/');
- $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(
@@ -142,16 +142,16 @@ class PolishSurnameTraditionTest 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 /Whiteżki/');
- $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(
@@ -165,16 +165,16 @@ class PolishSurnameTraditionTest 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(
@@ -199,10 +199,10 @@ class PolishSurnameTraditionTest extends TestCase
*/
public function testNewFatherNames(): 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(
@@ -216,10 +216,10 @@ class PolishSurnameTraditionTest extends TestCase
*/
public function testNewFatherNamesInflected(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Chris /Whitecka/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -227,10 +227,10 @@ class PolishSurnameTraditionTest extends TestCase
$this->surname_tradition->newParentNames($individual, 'M')
);
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Chris /Whitedzka/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -238,10 +238,10 @@ class PolishSurnameTraditionTest extends TestCase
$this->surname_tradition->newParentNames($individual, 'M')
);
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Chris /Whiteska/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -249,10 +249,10 @@ class PolishSurnameTraditionTest extends TestCase
$this->surname_tradition->newParentNames($individual, 'M')
);
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Chris /Whiteżka/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -266,10 +266,10 @@ class PolishSurnameTraditionTest extends TestCase
*/
public function testNewMotherNames(): 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(
@@ -283,10 +283,10 @@ class PolishSurnameTraditionTest 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]));
self::assertSame(
@@ -300,10 +300,10 @@ class PolishSurnameTraditionTest 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(
diff --git a/tests/app/SurnameTradition/PortugueseSurnameTraditionTest.php b/tests/app/SurnameTradition/PortugueseSurnameTraditionTest.php
index dceaaa82ef..cb37075baa 100644
--- a/tests/app/SurnameTradition/PortugueseSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/PortugueseSurnameTraditionTest.php
@@ -54,16 +54,16 @@ class PortugueseSurnameTraditionTest extends TestCase
*/
public function testNewChildNames(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Gabriel /Garcia/ /Iglesias/');
- $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('Maria /Ruiz/ /Lorca/');
- $mother = $this->createStub(Individual::class);
+ $mother = $this->createMock(Individual::class);
$mother->method('facts')->willReturn(new Collection([$mother_fact]));
self::assertSame(
@@ -98,16 +98,16 @@ class PortugueseSurnameTraditionTest extends TestCase
*/
public function testNewChildNamesCompunds(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Gabriel /Garcia/ y /Iglesias/');
- $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('Maria /Ruiz/ y /Lorca/');
- $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 PortugueseSurnameTraditionTest extends TestCase
*/
public function testNewParentNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Gabriel /Garcia/ /Iglesias/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -147,10 +147,10 @@ class PortugueseSurnameTraditionTest extends TestCase
*/
public function testNewSpouseNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Gabriel /Garcia/ /Iglesias/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
diff --git a/tests/app/SurnameTradition/SpanishSurnameTraditionTest.php b/tests/app/SurnameTradition/SpanishSurnameTraditionTest.php
index ff3d0eea18..ad57fd6fa2 100644
--- a/tests/app/SurnameTradition/SpanishSurnameTraditionTest.php
+++ b/tests/app/SurnameTradition/SpanishSurnameTraditionTest.php
@@ -44,16 +44,16 @@ class SpanishSurnameTraditionTest extends TestCase
*/
public function testNewChildNames(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Gabriel /Garcia/ /Iglesias/');
- $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('Gabriel /Ruiz/ /Lorca/');
- $mother = $this->createStub(Individual::class);
+ $mother = $this->createMock(Individual::class);
$mother->method('facts')->willReturn(new Collection([$mother_fact]));
self::assertSame(
@@ -88,16 +88,16 @@ class SpanishSurnameTraditionTest extends TestCase
*/
public function testNewChildNamesCompound(): void
{
- $father_fact = $this->createStub(Fact::class);
+ $father_fact = $this->createMock(Fact::class);
$father_fact->method('value')->willReturn('Gabriel /Garcia/ y /Iglesias/');
- $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('Gabriel /Ruiz/ y /Lorca/');
- $mother = $this->createStub(Individual::class);
+ $mother = $this->createMock(Individual::class);
$mother->method('facts')->willReturn(new Collection([$mother_fact]));
self::assertSame(
@@ -111,10 +111,10 @@ class SpanishSurnameTraditionTest extends TestCase
*/
public function testNewParentNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Gabriel /Garcia/ /Iglesias/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(
@@ -138,10 +138,10 @@ class SpanishSurnameTraditionTest extends TestCase
*/
public function testNewSpouseNames(): void
{
- $fact = $this->createStub(Fact::class);
+ $fact = $this->createMock(Fact::class);
$fact->method('value')->willReturn('Gabriel /Garcia/ /Iglesias/');
- $individual = $this->createStub(Individual::class);
+ $individual = $this->createMock(Individual::class);
$individual->method('facts')->willReturn(new Collection([$fact]));
self::assertSame(