diff options
| author | David Drury <ddrury@users.noreply.github.com> | 2020-12-23 17:54:33 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-23 17:54:33 +0000 |
| commit | 13488723b3bf9fcdea2b042b578a867fbea78b42 (patch) | |
| tree | 8cbbf7ad3c81b9ec5d1cbe6be70929703f1acbce /tests/app/Census | |
| parent | 290708e9d32aa2f6b9cf7f348a93de3b731c87cc (diff) | |
| download | webtrees-13488723b3bf9fcdea2b042b578a867fbea78b42.tar.gz webtrees-13488723b3bf9fcdea2b042b578a867fbea78b42.tar.bz2 webtrees-13488723b3bf9fcdea2b042b578a867fbea78b42.zip | |
Census assistant - for females get correct married name when there is more than one marriage (#3601)
Diffstat (limited to 'tests/app/Census')
| -rw-r--r-- | tests/app/Census/CensusColumnSurnameGivenNamesTest.php | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/app/Census/CensusColumnSurnameGivenNamesTest.php b/tests/app/Census/CensusColumnSurnameGivenNamesTest.php index 51f0f06bc4..9ad27ed0b1 100644 --- a/tests/app/Census/CensusColumnSurnameGivenNamesTest.php +++ b/tests/app/Census/CensusColumnSurnameGivenNamesTest.php @@ -41,6 +41,7 @@ class CensusColumnSurnameGivenNamesTest extends TestCase [ 'givn' => 'Joe', 'surname' => 'Sixpack', + 'full' => '<span class="NAME" dir="auto" translate="no">Joe <span class="SURN">Sixpack</span></span>', ], ]); $individual->method('spouseFamilies')->willReturn(new Collection()); @@ -66,6 +67,7 @@ class CensusColumnSurnameGivenNamesTest extends TestCase [ 'givn' => 'Joe Fred', 'surname' => 'Sixpack', + 'full' => '<span class="NAME" dir="auto" translate="no">Joe Fred <span class="SURN">Sixpack</span></span>', ], ]); $individual->method('spouseFamilies')->willReturn(new Collection()); @@ -87,7 +89,14 @@ class CensusColumnSurnameGivenNamesTest extends TestCase public function testNoName(): void { $individual = $this->createMock(Individual::class); - $individual->method('getAllNames')->willReturn([]); + $individual->method('getAllNames')->willReturn([ + [ + 'givn' => '@P.N.', + 'surname' => '@N.N.', + 'full' => '<span class="NAME" dir="auto" translate="no">… <span class="SURN">…</span></span>', + ] + + ]); $individual->method('spouseFamilies')->willReturn(new Collection()); $census = $this->createMock(CensusInterface::class); @@ -95,6 +104,6 @@ class CensusColumnSurnameGivenNamesTest extends TestCase $column = new CensusColumnSurnameGivenNames($census, '', ''); - $this->assertSame('', $column->generate($individual, $individual)); + $this->assertSame('…, …', $column->generate($individual, $individual)); } } |
