1<?php 2/** 3 * webtrees: online genealogy 4 * Copyright (C) 2018 webtrees development team 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */ 16declare(strict_types=1); 17 18namespace Fisharebest\Webtrees\SurnameTradition; 19 20/** 21 * Test harness for the class SpanishSurnameTradition 22 */ 23class IcelandicSurnameTraditionTest extends \Fisharebest\Webtrees\TestCase 24{ 25 /** @var SurnameTraditionInterface */ 26 private $surname_tradition; 27 28 /** 29 * Prepare the environment for these tests 30 * 31 * @return void 32 */ 33 public function setUp() 34 { 35 $this->surname_tradition = new IcelandicSurnameTradition; 36 } 37 38 /** 39 * Test whether married surnames are used 40 * 41 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 42 * 43 * @return void 44 */ 45 public function testMarriedSurnames() 46 { 47 $this->assertSame(false, $this->surname_tradition->hasMarriedNames()); 48 } 49 50 /** 51 * Test whether surnames are used 52 * 53 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 54 * 55 * @return void 56 */ 57 public function testSurnames() 58 { 59 $this->assertSame(false, $this->surname_tradition->hasSurnames()); 60 } 61 62 /** 63 * Test new son names 64 * 65 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 66 * 67 * @return void 68 */ 69 public function testNewSonNames() 70 { 71 $this->assertSame( 72 ['NAME' => 'Jonsson'], 73 $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'M') 74 ); 75 } 76 77 /** 78 * Test new daughter names 79 * 80 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 81 * 82 * @return void 83 */ 84 public function testNewDaughterNames() 85 { 86 $this->assertSame( 87 ['NAME' => 'Jonsdottir'], 88 $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'F') 89 ); 90 } 91 92 /** 93 * Test new child names 94 * 95 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 96 * 97 * @return void 98 */ 99 public function testNewChildNames() 100 { 101 $this->assertSame( 102 [], 103 $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'U') 104 ); 105 } 106 107 /** 108 * Test new father names 109 * 110 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 111 * 112 * @return void 113 */ 114 public function testNewFatherNames() 115 { 116 $this->assertSame( 117 [ 118 'NAME' => 'Einar', 119 'GIVN' => 'Einar', 120 ], 121 $this->surname_tradition->newParentNames('Jon Einarsson', 'M') 122 ); 123 } 124 125 /** 126 * Test new mother names 127 * 128 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 129 * 130 * @return void 131 */ 132 public function testNewMotherNames() 133 { 134 $this->assertSame( 135 [], 136 $this->surname_tradition->newParentNames('Jon Einarsson', 'F') 137 ); 138 } 139 140 /** 141 * Test new parent names 142 * 143 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 144 * 145 * @return void 146 */ 147 public function testNewParentNames() 148 { 149 $this->assertSame( 150 [], 151 $this->surname_tradition->newParentNames('Jon Einarsson', 'U') 152 ); 153 } 154 155 /** 156 * Test new husband names 157 * 158 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 159 * 160 * @return void 161 */ 162 public function testNewHusbandNames() 163 { 164 $this->assertSame( 165 [], 166 $this->surname_tradition->newSpouseNames('Eva Stefansdottir', 'M') 167 ); 168 } 169 170 /** 171 * Test new wife names 172 * 173 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 174 * 175 * @return void 176 */ 177 public function testNewWifeNames() 178 { 179 $this->assertSame( 180 [], 181 $this->surname_tradition->newSpouseNames('Jon Einarsson', 'F') 182 ); 183 } 184 185 /** 186 * Test new spouse names 187 * 188 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 189 * 190 * @return void 191 */ 192 public function testNewSpouseNames() 193 { 194 $this->assertSame( 195 [], 196 $this->surname_tradition->newSpouseNames('Jon Einarsson', 'U') 197 ); 198 } 199} 200