xref: /webtrees/tests/app/SurnameTradition/PolishSurnameTraditionTest.php (revision d11be7027e34e3121be11cc025421873364403f9)
1323788f4SGreg Roach<?php
23976b470SGreg Roach
3323788f4SGreg Roach/**
4323788f4SGreg Roach * webtrees: online genealogy
5*d11be702SGreg Roach * Copyright (C) 2023 webtrees development team
6323788f4SGreg Roach * This program is free software: you can redistribute it and/or modify
7323788f4SGreg Roach * it under the terms of the GNU General Public License as published by
8323788f4SGreg Roach * the Free Software Foundation, either version 3 of the License, or
9323788f4SGreg Roach * (at your option) any later version.
10323788f4SGreg Roach * This program is distributed in the hope that it will be useful,
11323788f4SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
12323788f4SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13323788f4SGreg Roach * GNU General Public License for more details.
14323788f4SGreg Roach * You should have received a copy of the GNU General Public License
1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
16323788f4SGreg Roach */
17fcfa147eSGreg Roach
18e7f56f2aSGreg Roachdeclare(strict_types=1);
19e7f56f2aSGreg Roach
2084e2cf4eSGreg Roachnamespace Fisharebest\Webtrees\SurnameTradition;
21c1010edaSGreg Roach
22cb7a42eaSGreg Roachuse Fisharebest\Webtrees\Fact;
23cb7a42eaSGreg Roachuse Fisharebest\Webtrees\Individual;
243cfcc809SGreg Roachuse Fisharebest\Webtrees\TestCase;
25cb7a42eaSGreg Roachuse Illuminate\Support\Collection;
263cfcc809SGreg Roach
27323788f4SGreg Roach/**
28c4943cffSGreg Roach * Test harness for the class PolishSurnameTradition
29323788f4SGreg Roach */
303cfcc809SGreg Roachclass PolishSurnameTraditionTest extends TestCase
31c1010edaSGreg Roach{
32c4943cffSGreg Roach    private SurnameTraditionInterface $surname_tradition;
33323788f4SGreg Roach
34323788f4SGreg Roach    /**
35c1ec7145SGreg Roach     * Test whether surnames are used
3617d74f3aSGreg Roach     *
3715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
3815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
3952348eb8SGreg Roach     *
4052348eb8SGreg Roach     * @return void
41c1ec7145SGreg Roach     */
429b802b22SGreg Roach    public function testSurnames(): void
43c1010edaSGreg Roach    {
44a171b6a5SGreg Roach        self::assertSame('//', $this->surname_tradition->defaultName());
45c1ec7145SGreg Roach    }
46c1ec7145SGreg Roach
47c1ec7145SGreg Roach    /**
48323788f4SGreg Roach     * Test new son names
4917d74f3aSGreg Roach     *
5015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
5115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
5252348eb8SGreg Roach     *
5352348eb8SGreg Roach     * @return void
54323788f4SGreg Roach     */
559b802b22SGreg Roach    public function testNewSonNames(): void
56c1010edaSGreg Roach    {
57cb7a42eaSGreg Roach        $father_fact = $this->createStub(Fact::class);
5883c91e47SGreg Roach        $father_fact->method('value')->willReturn('John /White/');
59cb7a42eaSGreg Roach
60cb7a42eaSGreg Roach        $father = $this->createStub(Individual::class);
6183c91e47SGreg Roach        $father->method('facts')->willReturn(new Collection([$father_fact]));
62cb7a42eaSGreg Roach
63cb7a42eaSGreg Roach        $mother_fact = $this->createStub(Fact::class);
6483c91e47SGreg Roach        $mother_fact->method('value')->willReturn('Mary /Black/');
65cb7a42eaSGreg Roach
66cb7a42eaSGreg Roach        $mother = $this->createStub(Individual::class);
6783c91e47SGreg Roach        $mother->method('facts')->willReturn(new Collection([$mother_fact]));
68cb7a42eaSGreg Roach
695e933c21SGreg Roach        self::assertSame(
708939e2c2SGreg Roach            ["1 NAME /White/\n2 TYPE BIRTH\n2 SURN White"],
71cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames($father, $mother, 'M')
72323788f4SGreg Roach        );
73323788f4SGreg Roach    }
74323788f4SGreg Roach
75323788f4SGreg Roach    /**
76323788f4SGreg Roach     * Test new daughter names
7717d74f3aSGreg Roach     *
7815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
7915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
8052348eb8SGreg Roach     *
8152348eb8SGreg Roach     * @return void
82323788f4SGreg Roach     */
839b802b22SGreg Roach    public function testNewDaughterNames(): void
84c1010edaSGreg Roach    {
85cb7a42eaSGreg Roach        $father_fact = $this->createStub(Fact::class);
8683c91e47SGreg Roach        $father_fact->method('value')->willReturn('John /White/');
87cb7a42eaSGreg Roach
88cb7a42eaSGreg Roach        $father = $this->createStub(Individual::class);
8983c91e47SGreg Roach        $father->method('facts')->willReturn(new Collection([$father_fact]));
90cb7a42eaSGreg Roach
91cb7a42eaSGreg Roach        $mother_fact = $this->createStub(Fact::class);
9283c91e47SGreg Roach        $mother_fact->method('value')->willReturn('Mary /Black/');
93cb7a42eaSGreg Roach
94cb7a42eaSGreg Roach        $mother = $this->createStub(Individual::class);
9583c91e47SGreg Roach        $mother->method('facts')->willReturn(new Collection([$mother_fact]));
96cb7a42eaSGreg Roach
975e933c21SGreg Roach        self::assertSame(
988939e2c2SGreg Roach            ["1 NAME /White/\n2 TYPE BIRTH\n2 SURN White"],
99cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames($father, $mother, 'F')
100323788f4SGreg Roach        );
101323788f4SGreg Roach    }
102323788f4SGreg Roach
103323788f4SGreg Roach    /**
104323788f4SGreg Roach     * Test new daughter names
10517d74f3aSGreg Roach     *
10615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
10715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
10852348eb8SGreg Roach     *
10952348eb8SGreg Roach     * @return void
110323788f4SGreg Roach     */
1119b802b22SGreg Roach    public function testNewDaughterNamesInflected(): void
112c1010edaSGreg Roach    {
113cb7a42eaSGreg Roach        $father_fact = $this->createStub(Fact::class);
11483c91e47SGreg Roach        $father_fact->method('value')->willReturn('John /Whitecki/');
115cb7a42eaSGreg Roach
116cb7a42eaSGreg Roach        $father = $this->createStub(Individual::class);
11783c91e47SGreg Roach        $father->method('facts')->willReturn(new Collection([$father_fact]));
118cb7a42eaSGreg Roach
119cb7a42eaSGreg Roach        $mother_fact = $this->createStub(Fact::class);
12083c91e47SGreg Roach        $mother_fact->method('value')->willReturn('Mary /Black/');
121cb7a42eaSGreg Roach
122cb7a42eaSGreg Roach        $mother = $this->createStub(Individual::class);
12383c91e47SGreg Roach        $mother->method('facts')->willReturn(new Collection([$mother_fact]));
124cb7a42eaSGreg Roach
1255e933c21SGreg Roach        self::assertSame(
1268939e2c2SGreg Roach            ["1 NAME /Whitecka/\n2 TYPE BIRTH\n2 SURN Whitecki"],
127cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames($father, $mother, 'F')
128323788f4SGreg Roach        );
129cb7a42eaSGreg Roach
130cb7a42eaSGreg Roach        $father_fact = $this->createStub(Fact::class);
13183c91e47SGreg Roach        $father_fact->method('value')->willReturn('John /Whitedzki/');
132cb7a42eaSGreg Roach
133cb7a42eaSGreg Roach        $father = $this->createStub(Individual::class);
13483c91e47SGreg Roach        $father->method('facts')->willReturn(new Collection([$father_fact]));
135cb7a42eaSGreg Roach
136cb7a42eaSGreg Roach        $mother_fact = $this->createStub(Fact::class);
13783c91e47SGreg Roach        $mother_fact->method('value')->willReturn('Mary /Black/');
138cb7a42eaSGreg Roach
139cb7a42eaSGreg Roach        $mother = $this->createStub(Individual::class);
14083c91e47SGreg Roach        $mother->method('facts')->willReturn(new Collection([$mother_fact]));
141cb7a42eaSGreg Roach
1425e933c21SGreg Roach        self::assertSame(
1438939e2c2SGreg Roach            ["1 NAME /Whitedzka/\n2 TYPE BIRTH\n2 SURN Whitedzki"],
144cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames($father, $mother, 'F')
145323788f4SGreg Roach        );
146cb7a42eaSGreg Roach
147cb7a42eaSGreg Roach        $father_fact = $this->createStub(Fact::class);
14883c91e47SGreg Roach        $father_fact->method('value')->willReturn('John /Whiteski/');
149cb7a42eaSGreg Roach
150cb7a42eaSGreg Roach        $father = $this->createStub(Individual::class);
15183c91e47SGreg Roach        $father->method('facts')->willReturn(new Collection([$father_fact]));
152cb7a42eaSGreg Roach
153cb7a42eaSGreg Roach        $mother_fact = $this->createStub(Fact::class);
15483c91e47SGreg Roach        $mother_fact->method('value')->willReturn('Mary /Black/');
155cb7a42eaSGreg Roach
156cb7a42eaSGreg Roach        $mother = $this->createStub(Individual::class);
15783c91e47SGreg Roach        $mother->method('facts')->willReturn(new Collection([$mother_fact]));
158cb7a42eaSGreg Roach
1595e933c21SGreg Roach        self::assertSame(
1608939e2c2SGreg Roach            ["1 NAME /Whiteska/\n2 TYPE BIRTH\n2 SURN Whiteski"],
161cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames($father, $mother, 'F')
162323788f4SGreg Roach        );
163cb7a42eaSGreg Roach
164cb7a42eaSGreg Roach        $father_fact = $this->createStub(Fact::class);
16583c91e47SGreg Roach        $father_fact->method('value')->willReturn('John /Whiteżki/');
166cb7a42eaSGreg Roach
167cb7a42eaSGreg Roach        $father = $this->createStub(Individual::class);
16883c91e47SGreg Roach        $father->method('facts')->willReturn(new Collection([$father_fact]));
169cb7a42eaSGreg Roach
170cb7a42eaSGreg Roach        $mother_fact = $this->createStub(Fact::class);
17183c91e47SGreg Roach        $mother_fact->method('value')->willReturn('Mary /Black/');
172cb7a42eaSGreg Roach
173cb7a42eaSGreg Roach        $mother = $this->createStub(Individual::class);
17483c91e47SGreg Roach        $mother->method('facts')->willReturn(new Collection([$mother_fact]));
175cb7a42eaSGreg Roach
1765e933c21SGreg Roach        self::assertSame(
1778939e2c2SGreg Roach            ["1 NAME /Whiteżka/\n2 TYPE BIRTH\n2 SURN Whiteżki"],
178cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames($father, $mother, 'F')
179323788f4SGreg Roach        );
180323788f4SGreg Roach    }
181323788f4SGreg Roach
182323788f4SGreg Roach    /**
183323788f4SGreg Roach     * Test new child names
18417d74f3aSGreg Roach     *
18515d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
18615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
18752348eb8SGreg Roach     *
18852348eb8SGreg Roach     * @return void
189323788f4SGreg Roach     */
1909b802b22SGreg Roach    public function testNewChildNames(): void
191c1010edaSGreg Roach    {
192cb7a42eaSGreg Roach        $father_fact = $this->createStub(Fact::class);
19383c91e47SGreg Roach        $father_fact->method('value')->willReturn('John /White/');
194cb7a42eaSGreg Roach
195cb7a42eaSGreg Roach        $father = $this->createStub(Individual::class);
19683c91e47SGreg Roach        $father->method('facts')->willReturn(new Collection([$father_fact]));
197cb7a42eaSGreg Roach
198cb7a42eaSGreg Roach        $mother_fact = $this->createStub(Fact::class);
19983c91e47SGreg Roach        $mother_fact->method('value')->willReturn('Mary /Black/');
200cb7a42eaSGreg Roach
201cb7a42eaSGreg Roach        $mother = $this->createStub(Individual::class);
20283c91e47SGreg Roach        $mother->method('facts')->willReturn(new Collection([$mother_fact]));
203cb7a42eaSGreg Roach
2045e933c21SGreg Roach        self::assertSame(
2058939e2c2SGreg Roach            ["1 NAME /White/\n2 TYPE BIRTH\n2 SURN White"],
206cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames($father, $mother, 'U')
207323788f4SGreg Roach        );
208323788f4SGreg Roach    }
209323788f4SGreg Roach
210323788f4SGreg Roach    /**
2111677a03aSGreg Roach     * Test new child names
21217d74f3aSGreg Roach     *
21315d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
21415d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
21552348eb8SGreg Roach     *
21652348eb8SGreg Roach     * @return void
2171677a03aSGreg Roach     */
2189b802b22SGreg Roach    public function testNewChildNamesWithNoParentsNames(): void
219c1010edaSGreg Roach    {
2205e933c21SGreg Roach        self::assertSame(
2218939e2c2SGreg Roach            ["1 NAME //\n2 TYPE BIRTH"],
222cb7a42eaSGreg Roach            $this->surname_tradition->newChildNames(null, null, 'U')
2231677a03aSGreg Roach        );
2241677a03aSGreg Roach    }
2251677a03aSGreg Roach
2261677a03aSGreg Roach    /**
227323788f4SGreg Roach     * Test new father names
22817d74f3aSGreg Roach     *
22915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
23015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
23152348eb8SGreg Roach     *
23252348eb8SGreg Roach     * @return void
233323788f4SGreg Roach     */
2349b802b22SGreg Roach    public function testNewFatherNames(): void
235c1010edaSGreg Roach    {
236cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
23783c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /White/');
238cb7a42eaSGreg Roach
239cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
24083c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
241cb7a42eaSGreg Roach
2425e933c21SGreg Roach        self::assertSame(
2438939e2c2SGreg Roach            ["1 NAME /White/\n2 TYPE BIRTH\n2 SURN White"],
244cb7a42eaSGreg Roach            $this->surname_tradition->newParentNames($individual, 'M')
245323788f4SGreg Roach        );
246323788f4SGreg Roach    }
247323788f4SGreg Roach
248323788f4SGreg Roach    /**
249323788f4SGreg Roach     * Test new father names
25017d74f3aSGreg Roach     *
25115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
25215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
25352348eb8SGreg Roach     *
25452348eb8SGreg Roach     * @return void
255323788f4SGreg Roach     */
2569b802b22SGreg Roach    public function testNewFatherNamesInflected(): void
257c1010edaSGreg Roach    {
258cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
25983c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /Whitecka/');
260cb7a42eaSGreg Roach
261cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
26283c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
263cb7a42eaSGreg Roach
2645e933c21SGreg Roach        self::assertSame(
2658939e2c2SGreg Roach            ["1 NAME /Whitecki/\n2 TYPE BIRTH\n2 SURN Whitecki"],
266cb7a42eaSGreg Roach            $this->surname_tradition->newParentNames($individual, 'M')
267323788f4SGreg Roach        );
268cb7a42eaSGreg Roach
269cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
27083c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /Whitedzka/');
271cb7a42eaSGreg Roach
272cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
27383c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
274cb7a42eaSGreg Roach
2755e933c21SGreg Roach        self::assertSame(
2768939e2c2SGreg Roach            ["1 NAME /Whitedzki/\n2 TYPE BIRTH\n2 SURN Whitedzki"],
277cb7a42eaSGreg Roach            $this->surname_tradition->newParentNames($individual, 'M')
278323788f4SGreg Roach        );
279cb7a42eaSGreg Roach
280cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
28183c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /Whiteska/');
282cb7a42eaSGreg Roach
283cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
28483c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
285cb7a42eaSGreg Roach
2865e933c21SGreg Roach        self::assertSame(
2878939e2c2SGreg Roach            ["1 NAME /Whiteski/\n2 TYPE BIRTH\n2 SURN Whiteski"],
288cb7a42eaSGreg Roach            $this->surname_tradition->newParentNames($individual, 'M')
289323788f4SGreg Roach        );
290cb7a42eaSGreg Roach
291cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
29283c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /Whiteżka/');
293cb7a42eaSGreg Roach
294cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
29583c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
296cb7a42eaSGreg Roach
2975e933c21SGreg Roach        self::assertSame(
2988939e2c2SGreg Roach            ["1 NAME /Whiteżki/\n2 TYPE BIRTH\n2 SURN Whiteżki"],
299cb7a42eaSGreg Roach            $this->surname_tradition->newParentNames($individual, 'M')
300323788f4SGreg Roach        );
301323788f4SGreg Roach    }
302323788f4SGreg Roach
303323788f4SGreg Roach    /**
304323788f4SGreg Roach     * Test new mother names
30517d74f3aSGreg Roach     *
30615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
30715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
30852348eb8SGreg Roach     *
30952348eb8SGreg Roach     * @return void
310323788f4SGreg Roach     */
3119b802b22SGreg Roach    public function testNewMotherNames(): void
312c1010edaSGreg Roach    {
313cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
31483c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /White/');
315cb7a42eaSGreg Roach
316cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
31783c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
318cb7a42eaSGreg Roach
3195e933c21SGreg Roach        self::assertSame(
3208939e2c2SGreg Roach            ["1 NAME //\n2 TYPE BIRTH"],
321cb7a42eaSGreg Roach            $this->surname_tradition->newParentNames($individual, 'F')
322323788f4SGreg Roach        );
323323788f4SGreg Roach    }
324323788f4SGreg Roach
325323788f4SGreg Roach    /**
326323788f4SGreg Roach     * Test new parent names
32717d74f3aSGreg Roach     *
32815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
32915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
33052348eb8SGreg Roach     *
33152348eb8SGreg Roach     * @return void
332323788f4SGreg Roach     */
3339b802b22SGreg Roach    public function testNewParentNames(): void
334c1010edaSGreg Roach    {
335cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
33683c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /White/');
337323788f4SGreg Roach
338cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
33983c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
340323788f4SGreg Roach
3415e933c21SGreg Roach        self::assertSame(
3428939e2c2SGreg Roach            ["1 NAME //\n2 TYPE BIRTH"],
343cb7a42eaSGreg Roach            $this->surname_tradition->newParentNames($individual, 'U')
344323788f4SGreg Roach        );
345323788f4SGreg Roach    }
346323788f4SGreg Roach
347323788f4SGreg Roach    /**
348323788f4SGreg Roach     * Test new spouse names
34917d74f3aSGreg Roach     *
35015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PolishSurnameTradition
35115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\SurnameTradition\PatrilinealSurnameTradition
35252348eb8SGreg Roach     *
35352348eb8SGreg Roach     * @return void
354323788f4SGreg Roach     */
3559b802b22SGreg Roach    public function testNewSpouseNames(): void
356c1010edaSGreg Roach    {
357cb7a42eaSGreg Roach        $fact = $this->createStub(Fact::class);
35883c91e47SGreg Roach        $fact->method('value')->willReturn('Chris /White/');
359cb7a42eaSGreg Roach
360cb7a42eaSGreg Roach        $individual = $this->createStub(Individual::class);
36183c91e47SGreg Roach        $individual->method('facts')->willReturn(new Collection([$fact]));
362cb7a42eaSGreg Roach
3635e933c21SGreg Roach        self::assertSame(
3648939e2c2SGreg Roach            ["1 NAME //\n2 TYPE BIRTH"],
365cb7a42eaSGreg Roach            $this->surname_tradition->newSpouseNames($individual, 'M')
366323788f4SGreg Roach        );
367cb7a42eaSGreg Roach
368cb7a42eaSGreg Roach        self::assertSame(
3698939e2c2SGreg Roach            ["1 NAME //\n2 TYPE BIRTH", "1 NAME /White/\n2 TYPE MARRIED\n2 SURN White"],
370cb7a42eaSGreg Roach            $this->surname_tradition->newSpouseNames($individual, 'F')
371cb7a42eaSGreg Roach        );
372cb7a42eaSGreg Roach
373cb7a42eaSGreg Roach        self::assertSame(
3748939e2c2SGreg Roach            ["1 NAME //\n2 TYPE BIRTH"],
375cb7a42eaSGreg Roach            $this->surname_tradition->newSpouseNames($individual, 'U')
376cb7a42eaSGreg Roach        );
377cb7a42eaSGreg Roach    }
378cb7a42eaSGreg Roach
379cb7a42eaSGreg Roach    /**
380cb7a42eaSGreg Roach     * Prepare the environment for these tests
381cb7a42eaSGreg Roach     *
382cb7a42eaSGreg Roach     * @return void
383cb7a42eaSGreg Roach     */
384cb7a42eaSGreg Roach    protected function setUp(): void
385cb7a42eaSGreg Roach    {
386cb7a42eaSGreg Roach        parent::setUp();
387cb7a42eaSGreg Roach
388cb7a42eaSGreg Roach        $this->surname_tradition = new PolishSurnameTradition();
389323788f4SGreg Roach    }
390323788f4SGreg Roach}
391