1<?php 2 3/** 4 * webtrees: online genealogy 5 * Copyright (C) 2021 webtrees development team 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <https://www.gnu.org/licenses/>. 16 */ 17 18declare(strict_types=1); 19 20namespace Fisharebest\Webtrees; 21 22use Fisharebest\Webtrees\Factories\FamilyFactory; 23use Fisharebest\Webtrees\Factories\IndividualFactory; 24use Fisharebest\Webtrees\Module\LanguageEnglishGreatBritain; 25use Fisharebest\Webtrees\Module\LanguageFrench; 26use Fisharebest\Webtrees\Services\RelationshipService; 27 28/** 29 * Test the user functions 30 * 31 * @covers \Fisharebest\Webtrees\Relationship 32 * @covers \Fisharebest\Webtrees\Services\RelationshipService 33 * @covers \Fisharebest\Webtrees\Module\LanguageEnglishGreatBritain 34 * @covers \Fisharebest\Webtrees\Module\LanguageEnglishUnitedStates 35 * @covers \Fisharebest\Webtrees\Module\LanguageFrench 36 * @covers \Fisharebest\Webtrees\Module\ModuleLanguageTrait 37 */ 38class RelationshipNamesTest extends TestCase 39{ 40 /** 41 * @return void 42 */ 43 public function testRelationshipNames(): void 44 { 45 // i22m===f10===i23f 46 // | 47 // +-----+-----+ 48 // | | 49 // i20m===f9===i21f i24m===f11m===i25f 50 // | | 51 // i19f===f8===i18m i26f===f12===i27m 52 // | | 53 // +---+---+ +---+---+ 54 // | | | | 55 // i16m===f7===i17f i30m i28u i29m===f15 56 // | | 57 // i12f===f4m===i11m i13m===f5m===i14f i34f 58 // | | 59 // i1m===f1m==========i2f===f2d===i6m=====f13m===i31m===f14d===i32f 60 // | | | 61 // +---+---+ +---+---+ | 62 // | | | | | | | 63 // i10f===f3e===i3m i4f i5u i7ma i8f i9u===f6===i15u i33f 64 // 65 // Individual suffixes - m(ale), f(emale), u(nknown), a(dopted) 66 // Family suffixes - m(arried), d(ivorced), e(ngaged) 67 // 68 $tree = $this->createMock(Tree::class); 69 70 $individual_factory = $this->createStub(IndividualFactory::class); 71 $family_factory = $this->createStub(FamilyFactory::class); 72 73 Registry::familyFactory($family_factory); 74 Registry::individualFactory($individual_factory); 75 76 $i1m = new Individual('i1m', "0 @i1m@ INDI\n1 SEX M\n1 FAMS @f1m@\n1 FAMC @f4m@", null, $tree); 77 $i2f = new Individual('i2f', "0 @i2f@ INDI\n1 SEX F\n1 FAMS @f1m@\n1 FAMS @f2d@\n2 FAMC @f5m@", null, $tree); 78 $i3m = new Individual('i3m', "0 @i3m@ INDI\n1 SEX M\n1 FAMC @f1m@\n1 FAMS @f3e@\n1 BIRT\n2 DATE 2000", null, $tree); 79 $i4f = new Individual('i4f', "0 @i4f@ INDI\n1 SEX F\n1 FAMC @f1m@\n1 BIRT\n2 DATE 2001", null, $tree); 80 $i5u = new Individual('i5u', "0 @i5u@ INDI\n1 SEX U\n1 FAMC @f1m@\n1 BIRT\n2 DATE 2002", null, $tree); 81 $i6m = new Individual('i6m', "0 @i6m@ INDI\n1 SEX M\n1 FAMS @f2d@", null, $tree); 82 $i7ma = new Individual('i7ma', "0 @i7ma@ INDI\n1 SEX M\n1 FAMC @f2d@\n2 PEDI adopted", null, $tree); 83 $i8f = new Individual('i8f', "0 @i8f@ INDI\n1 SEX F\n1 FAMC @f2d@", null, $tree); 84 $i9u = new Individual('i9u', "0 @i9u@ INDI\n1 SEX U\n1 FAMC @f2d@\n1 FAMS @f6@", null, $tree); 85 $i10f = new Individual('i10f', "0 @i10f@ INDI\n1 SEX F\n1 FAMS @f3e@", null, $tree); 86 $i11m = new Individual('i11m', "0 @i11f@ INDI\n1 SEX M\n1 FAMS @f4m@\n1 FAMC @f7@", null, $tree); 87 $i12f = new Individual('i12f', "0 @i12f@ INDI\n1 SEX F\n1 FAMS @f4m@", null, $tree); 88 $i13m = new Individual('i13m', "0 @i13f@ INDI\n1 SEX M\n1 FAMS @f5m@", null, $tree); 89 $i14f = new Individual('i14f', "0 @i14f@ INDI\n1 SEX F\n1 FAMS @f5m@", null, $tree); 90 $i15u = new Individual('i15u', "0 @i15u@ INDI\n1 SEX U\n1 FAMS @f6@", null, $tree); 91 $i16m = new Individual('i16m', "0 @i16m@ INDI\n1 SEX M\n1 FAMS @f7@", null, $tree); 92 $i17f = new Individual('i17f', "0 @i17f@ INDI\n1 SEX F\n1 FAMS @f7@\n1 FAMC @f8@", null, $tree); 93 $i18m = new Individual('i18m', "0 @i18m@ INDI\n1 SEX M\n1 FAMS @f8@\n1 FAMC @f9@", null, $tree); 94 $i19f = new Individual('i19f', "0 @i19f@ INDI\n1 SEX F\n1 FAMS @f8@", null, $tree); 95 $i20m = new Individual('i20m', "0 @i20m@ INDI\n1 SEX M\n1 FAMS @f9@", null, $tree); 96 $i21f = new Individual('i21f', "0 @i21f@ INDI\n1 SEX F\n1 FAMS @f9@\n1 FAMC @f10@", null, $tree); 97 $i22m = new Individual('i22m', "0 @i22m@ INDI\n1 SEX M\n1 FAMS @f10@", null, $tree); 98 $i23f = new Individual('i23f', "0 @i23f@ INDI\n1 SEX F\n1 FAMS @f10@", null, $tree); 99 $i24m = new Individual('i24m', "0 @i24m@ INDI\n1 SEX M\n1 FAMS @f11@\n1 FAMC @f10@", null, $tree); 100 $i25f = new Individual('i25f', "0 @i25f@ INDI\n1 SEX F\n1 FAMS @f11@", null, $tree); 101 $i26f = new Individual('i26f', "0 @i26f@ INDI\n1 SEX F\n1 FAMS @f12@\n1 FAMC @f11@", null, $tree); 102 $i27m = new Individual('i27m', "0 @i27m@ INDI\n1 SEX M\n1 FAMS @f12@", null, $tree); 103 $i28u = new Individual('i28u', "0 @i28u@ INDI\n1 SEX U\n1 FAMC @f12@", null, $tree); 104 $i29m = new Individual('i29m', "0 @i29m@ INDI\n1 SEX M\n1 FAMC @f12@", null, $tree); 105 $i30m = new Individual('i30m', "0 @i30m@ INDI\n1 SEX M\n1 FAMC @f8@", null, $tree); 106 $i31m = new Individual('i31m', "0 @i31m@ INDI\n1 SEX M\n1 FAMS @f13m@\n1 FAMS @f14d@", null, $tree); 107 $i32f = new Individual('i32f', "0 @i32f@ INDI\n1 SEX F\n1 FAMS @f14d@", null, $tree); 108 $i33f = new Individual('i33f', "0 @i33f@ INDI\n1 SEX F\n1 FAMC @f14d@", null, $tree); 109 $i34f = new Individual('i34f', "0 @i34f@ INDI\n1 SEX F\n1 FAMC @f15@", null, $tree); 110 111 $individual_factory->method('make')->will($this->returnValueMap([ 112 'i1m' => $i1m, 113 'i2f' => $i2f, 114 'i3m' => $i3m, 115 'i4f' => $i4f, 116 'i5u' => $i5u, 117 'i6m' => $i6m, 118 'i7ma' => $i7ma, 119 'i8f' => $i8f, 120 'i9u' => $i9u, 121 'i10f' => $i10f, 122 'i11m' => $i11m, 123 'i12f' => $i12f, 124 'i13m' => $i13m, 125 'i14f' => $i14f, 126 'i15u' => $i15u, 127 'i16m' => $i16m, 128 'i17f' => $i17f, 129 'i18m' => $i18m, 130 'i19f' => $i19f, 131 'i20m' => $i20m, 132 'i21f' => $i21f, 133 'i22m' => $i22m, 134 'i23f' => $i23f, 135 'i24m' => $i24m, 136 'i25f' => $i25f, 137 'i26f' => $i26f, 138 'i27m' => $i27m, 139 'i28u' => $i28u, 140 'i29m' => $i29m, 141 'i30m' => $i30m, 142 'i31m' => $i31m, 143 'i32f' => $i32f, 144 'i33f' => $i33f, 145 'i34f' => $i34f 146 ])); 147 148 $f1m = new Family('f1m', "0 @f1m@ FAM\n1 MARR Y\n1 HUSB @i1m@\n1 WIFE @i2f@\n1 CHIL @i3m@\n1 CHIL @i4f@\n1 CHIL @i5u@", null, $tree); 149 $f2d = new Family('f2d', "0 @f2d@ FAM\n1 DIV Y\n1 HUSB @i6m@\n1 WIFE @i2f@\n1 CHIL @i7ma@\n1 CHIL @i8f@\n1 CHIL @i9u@", null, $tree); 150 $f3e = new Family('f3e', "0 @f3e@ FAM\n1 ENGA Y\n1 HUSB @i3m@\n1 WIFE @i10f@", null, $tree); 151 $f4m = new Family('f4m', "0 @f4m@ FAM\n1 MARR Y\n1 HUSB @i11m@\n1 WIFE @i12f@\n1 CHIL @i1m@", null, $tree); 152 $f5m = new Family('f5m', "0 @f5m@ FAM\n1 MARR Y\n1 HUSB @i13m@\n1 WIFE @i14f@\n1 CHIL @i2f@", null, $tree); 153 $f6 = new Family('f6', "0 @f6@ FAM\n1 HUSB @i9u@\n1 WIFE @i15u@", null, $tree); 154 $f7 = new Family('f7', "0 @f7@ FAM\n1 HUSB @i16m@\n1 WIFE @i17f@\n1 CHIL @i11m@", null, $tree); 155 $f8 = new Family('f8', "0 @f8@ FAM\n1 HUSB @i18m@\n1 WIFE @i19f@\n1 CHIL @i17f@\n1 CHIL @i30m@", null, $tree); 156 $f9 = new Family('f9', "0 @f9@ FAM\n1 HUSB @i20m@\n1 WIFE @i21f@\n1 CHIL @i18m@", null, $tree); 157 $f10 = new Family('f10', "0 @f10@ FAM\n1 HUSB @i22m@\n1 WIFE @i23f@\n1 CHIL @i21f@\n1 CHIL @i24m@", null, $tree); 158 $f11m = new Family('f11m', "0 @f11m@ FAM\n1 MARR Y\n1 HUSB @i24m@\n1 WIFE @i25f@\n1 CHIL @i26f@", null, $tree); 159 $f12 = new Family('f12', "0 @f12@ FAM\n1 HUSB @i27m@\n1 WIFE @i26f@\n1 CHIL @i28u@\n1 CHIL @i29m@", null, $tree); 160 $f13m = new Family('f13m', "0 @f13m@ FAM\n1 MARR Y\n1 HUSB @i6m@\n1 WIFE @i31m@", null, $tree); 161 $f14d = new Family('f14d', "0 @f14d@ FAM\n1 DIV Y\n1 HUSB @i31m@\n1 WIFE @i32f@\n1 CHIL @i33f@\n", null, $tree); 162 $f15 = new Family('f15', "0 @f15@ FAM\n1 HUSB @i29m@\n1 CHIL @i34f@\n", null, $tree); 163 164 $family_factory->method('make')->will($this->returnValueMap([ 165 'f1m' => $f1m, 166 'f2d' => $f2d, 167 'f3e' => $f3e, 168 'f4m' => $f4m, 169 'f5m' => $f5m, 170 'f6' => $f6, 171 'f7' => $f7, 172 'f8' => $f8, 173 'f9' => $f9, 174 'f10' => $f10, 175 'f11m' => $f11m, 176 'f12' => $f12, 177 'f13m' => $f13m, 178 'f14d' => $f14d, 179 'f15' => $f15 180 ])); 181 182 $service = new RelationshipService(); 183 184 // ENGLISH 185 $en_gb = new LanguageEnglishGreatBritain(); 186 // Static relationships 187 self::assertSame('wife', $service->nameFromPath([$i1m, $f1m, $i2f], $en_gb)); 188 self::assertSame('husband', $service->nameFromPath([$i2f, $f1m, $i1m], $en_gb)); 189 self::assertSame('partner', $service->nameFromPath([$i9u, $f6, $i15u], $en_gb)); 190 self::assertSame('ex-husband', $service->nameFromPath([$i2f, $f2d, $i6m], $en_gb)); 191 self::assertSame('ex-wife', $service->nameFromPath([$i6m, $f2d, $i2f], $en_gb)); 192 self::assertSame('fiancé', $service->nameFromPath([$i10f, $f3e, $i3m], $en_gb)); 193 self::assertSame('fiancée', $service->nameFromPath([$i3m, $f3e, $i10f], $en_gb)); 194 self::assertSame('son', $service->nameFromPath([$i1m, $f1m, $i3m], $en_gb)); 195 self::assertSame('daughter', $service->nameFromPath([$i1m, $f1m, $i4f], $en_gb)); 196 self::assertSame('child', $service->nameFromPath([$i1m, $f1m, $i5u], $en_gb)); 197 self::assertSame('elder brother', $service->nameFromPath([$i4f, $f1m, $i3m], $en_gb)); 198 self::assertSame('younger sister', $service->nameFromPath([$i3m, $f1m, $i4f], $en_gb)); 199 self::assertSame('younger sibling', $service->nameFromPath([$i3m, $f1m, $i5u], $en_gb)); 200 self::assertSame('brother', $service->nameFromPath([$i8f, $f2d, $i7ma], $en_gb)); 201 self::assertSame('sister', $service->nameFromPath([$i7ma, $f2d, $i8f], $en_gb)); 202 self::assertSame('sibling', $service->nameFromPath([$i7ma, $f2d, $i9u], $en_gb)); 203 self::assertSame('adoptive-mother', $service->nameFromPath([$i7ma, $f2d, $i2f], $en_gb)); 204 self::assertSame('adoptive-father', $service->nameFromPath([$i7ma, $f2d, $i6m], $en_gb)); 205 self::assertSame('adopted-son', $service->nameFromPath([$i6m, $f2d, $i7ma], $en_gb)); 206 self::assertSame('stepfather', $service->nameFromPath([$i8f, $f2d, $i2f, $f1m, $i1m], $en_gb)); 207 self::assertSame('stepdaughter', $service->nameFromPath([$i1m, $f1m, $i2f, $f2d, $i8f], $en_gb)); 208 self::assertSame('half-brother', $service->nameFromPath([$i8f, $f2d, $i2f, $f1m, $i3m], $en_gb)); 209 self::assertSame('stepsister', $service->nameFromPath([$i8f, $f2d, $i6m, $f13m, $i31m, $f14d, $i33f], $en_gb)); 210 self::assertSame('stepfather', $service->nameFromPath([$i8f, $f2d, $i6m, $f13m, $i31m], $en_gb)); 211 self::assertSame('mother-in-law', $service->nameFromPath([$i2f, $f1m, $i1m, $f4m, $i12f], $en_gb)); 212 self::assertSame('daughter-in-law', $service->nameFromPath([$i12f, $f4m, $i1m, $f1m, $i2f], $en_gb)); 213 self::assertSame('paternal-grandfather', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m], $en_gb)); 214 self::assertSame('paternal-grandmother', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i12f], $en_gb)); 215 self::assertSame('maternal-grandfather', $service->nameFromPath([$i3m, $f1m, $i2f, $f5m, $i13m], $en_gb)); 216 self::assertSame('maternal-grandmother', $service->nameFromPath([$i3m, $f1m, $i2f, $f5m, $i14f], $en_gb)); 217 // Dynamic relationships 218 self::assertSame('paternal great-grandfather', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i16m], $en_gb)); 219 self::assertSame('paternal great-grandmother', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f], $en_gb)); 220 self::assertSame('paternal great-great-grandfather', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m], $en_gb)); 221 self::assertSame('paternal great-great-grandmother', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i19f], $en_gb)); 222 self::assertSame('paternal great-great-great-grandfather', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i20m], $en_gb)); 223 self::assertSame('paternal great-great-great-grandmother', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f], $en_gb)); 224 self::assertSame('paternal great ×4 grandfather', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i22m], $en_gb)); 225 self::assertSame('paternal great ×4 grandmother', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i23f], $en_gb)); 226 self::assertSame('uncle', $service->nameFromPath([$i18m, $f9, $i21f, $f10, $i24m], $en_gb)); 227 self::assertSame('great-uncle', $service->nameFromPath([$i30m, $f8, $i18m, $f9, $i21f, $f10, $i24m], $en_gb)); 228 self::assertSame('great-great-uncle', $service->nameFromPath([$i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i24m], $en_gb)); 229 self::assertSame('nephew', $service->nameFromPath([$i24m, $f10, $i21f, $f9, $i18m], $en_gb)); 230 self::assertSame('great-niece', $service->nameFromPath([$i24m, $f10, $i21f, $f9, $i18m, $f8, $i17f], $en_gb)); 231 self::assertSame('great-great-nephew', $service->nameFromPath([$i24m, $f10, $i21f, $f9, $i18m, $f8, $i17f, $f7, $i11m], $en_gb)); 232 self::assertSame('first cousin', $service->nameFromPath([$i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f], $en_gb)); 233 self::assertSame('second cousin', $service->nameFromPath([$i30m, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f, $f12, $i29m], $en_gb)); 234 self::assertSame('first cousin once removed ascending', $service->nameFromPath([$i30m, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f], $en_gb)); 235 self::assertSame('first cousin once removed descending', $service->nameFromPath([$i26f, $f11m, $i24m, $f10, $i21f, $f9, $i18m, $f8, $i17f], $en_gb)); 236 self::assertSame('second cousin once removed ascending', $service->nameFromPath([ $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f, $f12, $i29m], $en_gb)); 237 // Compound relationships 238 self::assertSame('wife’s ex-husband', $service->nameFromPath([$i1m, $f1m, $i2f, $f2d, $i6m], $en_gb)); 239 240 // FRENCH 241 $fr = new LanguageFrench(); 242 243 // Static relationships 244 self::assertSame('épouse', $service->nameFromPath([$i1m, $f1m, $i2f], $fr)); 245 self::assertSame('époux', $service->nameFromPath([$i2f, $f1m, $i1m], $fr)); 246 self::assertSame('conjoint', $service->nameFromPath([$i9u, $f6, $i15u], $fr)); 247 self::assertSame('ex-époux', $service->nameFromPath([$i2f, $f2d, $i6m], $fr)); 248 self::assertSame('ex-épouse', $service->nameFromPath([$i6m, $f2d, $i2f], $fr)); 249 self::assertSame('fiancé', $service->nameFromPath([$i10f, $f3e, $i3m], $fr)); 250 self::assertSame('fiancée', $service->nameFromPath([$i3m, $f3e, $i10f], $fr)); 251 self::assertSame('fils', $service->nameFromPath([$i1m, $f1m, $i3m], $fr)); 252 self::assertSame('fille', $service->nameFromPath([$i1m, $f1m, $i4f], $fr)); 253 self::assertSame('enfant', $service->nameFromPath([$i1m, $f1m, $i5u], $fr)); 254 self::assertSame('grand frère', $service->nameFromPath([$i4f, $f1m, $i3m], $fr)); 255 self::assertSame('petite sœur', $service->nameFromPath([$i3m, $f1m, $i4f], $fr)); 256 self::assertSame('petit frère/sœur', $service->nameFromPath([$i3m, $f1m, $i5u], $fr)); 257 self::assertSame('frère', $service->nameFromPath([$i8f, $f2d, $i7ma], $fr)); 258 self::assertSame('sœur', $service->nameFromPath([$i7ma, $f2d, $i8f], $fr)); 259 self::assertSame('frère/sœur', $service->nameFromPath([$i7ma, $f2d, $i9u], $fr)); 260 self::assertSame('mère adoptive', $service->nameFromPath([$i7ma, $f2d, $i2f], $fr)); 261 self::assertSame('père adoptif', $service->nameFromPath([$i7ma, $f2d, $i6m], $fr)); 262 self::assertSame('fils adoptif', $service->nameFromPath([$i6m, $f2d, $i7ma], $fr)); 263 self::assertSame('beau-père', $service->nameFromPath([$i8f, $f2d, $i2f, $f1m, $i1m], $fr)); 264 self::assertSame('belle-fille', $service->nameFromPath([$i1m, $f1m, $i2f, $f2d, $i8f], $fr)); 265 self::assertSame('demi-frère', $service->nameFromPath([$i8f, $f2d, $i2f, $f1m, $i3m], $fr)); 266 self::assertSame('quasi-sœur', $service->nameFromPath([$i8f, $f2d, $i6m, $f13m, $i31m, $f14d, $i33f], $fr)); 267 self::assertSame('beau-père', $service->nameFromPath([$i8f, $f2d, $i6m, $f13m, $i31m], $fr)); 268 self::assertSame('belle-mère', $service->nameFromPath([$i2f, $f1m, $i1m, $f4m, $i12f], $fr)); 269 self::assertSame('belle-fille', $service->nameFromPath([$i12f, $f4m, $i1m, $f1m, $i2f], $fr)); 270 // Dynamic relationships 271 self::assertSame('grand-père paternel', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m], $fr)); 272 self::assertSame('grand-mère paternelle', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i12f], $fr)); 273 self::assertSame('grand-père maternel', $service->nameFromPath([$i3m, $f1m, $i2f, $f5m, $i13m], $fr)); 274 self::assertSame('grand-mère maternelle', $service->nameFromPath([$i3m, $f1m, $i2f, $f5m, $i14f], $fr)); 275 self::assertSame('arrière-grand-père paternel', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i16m], $fr)); 276 self::assertSame('arrière-grand-mère paternelle', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f], $fr)); 277 self::assertSame('arrière-arrière-grand-père paternel', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m], $fr)); 278 self::assertSame('arrière-arrière-grand-mère paternelle', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i19f], $fr)); 279 self::assertSame('arrière-(x3)-grand-père paternel', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i20m], $fr)); 280 self::assertSame('arrière-(x3)-grand-mère paternelle', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f], $fr)); 281 self::assertSame('arrière-(x4)-grand-père paternel', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i22m], $fr)); 282 self::assertSame('arrière-(x4)-grand-mère paternelle', $service->nameFromPath([$i3m, $f1m, $i1m, $f4m, $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i23f], $fr)); 283 self::assertSame('oncle', $service->nameFromPath([$i18m, $f9, $i21f, $f10, $i24m], $fr)); 284 self::assertSame('grand-oncle', $service->nameFromPath([$i30m, $f8, $i18m, $f9, $i21f, $f10, $i24m], $fr)); 285 self::assertSame('arrière-grand-oncle', $service->nameFromPath([$i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i24m], $fr)); 286 self::assertSame('neveu', $service->nameFromPath([$i24m, $f10, $i21f, $f9, $i18m], $fr)); 287 self::assertSame('petite-nièce', $service->nameFromPath([$i24m, $f10, $i21f, $f9, $i18m, $f8, $i17f], $fr)); 288 self::assertSame('arrière-petit-neveu', $service->nameFromPath([$i24m, $f10, $i21f, $f9, $i18m, $f8, $i17f, $f7, $i11m], $fr)); 289 self::assertSame('cousine germaine', $service->nameFromPath([$i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f], $fr)); 290 self::assertSame('cousin issu de germain', $service->nameFromPath([$i30m, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f, $f12, $i29m], $fr)); 291 self::assertSame('cousine au 3<sup>e</sup> degré', $service->nameFromPath([$i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f, $f12, $i29m, $f15, $i34f], $fr)); 292 self::assertSame('grand-cousine', $service->nameFromPath([$i30m, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f], $fr)); 293 self::assertSame('petit-cousin', $service->nameFromPath([$i26f, $f11m, $i24m, $f10, $i21f, $f9, $i18m, $f8, $i30m], $fr)); 294 self::assertSame('cousin du 2<sup>e</sup> au 3<sup>e</sup> degré', $service->nameFromPath([ $i11m, $f7, $i17f, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f, $f12, $i29m], $fr)); 295 self::assertSame('cousine du 3<sup>e</sup> au 2<sup>e</sup> degré', $service->nameFromPath([ $i17f, $f8, $i18m, $f9, $i21f, $f10, $i24m, $f11m, $i26f, $f12, $i29m, $f15, $i34f], $fr)); 296 // Compound relationships 297 self::assertSame('ex-époux de l’épouse', $service->nameFromPath([$i1m, $f1m, $i2f, $f2d, $i6m], $fr)); 298 299 // SLOVAK 300 } 301} 302