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 */ 16namespace Fisharebest\Webtrees\SurnameTradition; 17 18use Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition; 19use Fisharebest\Webtrees\SurnameTradition\SurnameTraditionInterface; 20 21/** 22 * Test harness for the class SpanishSurnameTradition 23 */ 24class IcelandicSurnameTraditionTest extends \Fisharebest\Webtrees\TestCase 25{ 26 /** @var SurnameTraditionInterface */ 27 private $surname_tradition; 28 29 /** 30 * Prepare the environment for these tests 31 * 32 * @return void 33 */ 34 public function setUp() 35 { 36 $this->surname_tradition = new IcelandicSurnameTradition; 37 } 38 39 /** 40 * Test whether married surnames are used 41 * 42 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 43 * 44 * @return void 45 */ 46 public function testMarriedSurnames() 47 { 48 $this->assertSame(false, $this->surname_tradition->hasMarriedNames()); 49 } 50 51 /** 52 * Test whether surnames are used 53 * 54 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 55 * 56 * @return void 57 */ 58 public function testSurnames() 59 { 60 $this->assertSame(false, $this->surname_tradition->hasSurnames()); 61 } 62 63 /** 64 * Test new son names 65 * 66 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 67 * 68 * @return void 69 */ 70 public function testNewSonNames() 71 { 72 $this->assertSame( 73 ['NAME' => 'Jonsson'], 74 $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'M') 75 ); 76 } 77 78 /** 79 * Test new daughter names 80 * 81 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 82 * 83 * @return void 84 */ 85 public function testNewDaughterNames() 86 { 87 $this->assertSame( 88 ['NAME' => 'Jonsdottir'], 89 $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'F') 90 ); 91 } 92 93 /** 94 * Test new child names 95 * 96 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 97 * 98 * @return void 99 */ 100 public function testNewChildNames() 101 { 102 $this->assertSame( 103 [], 104 $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'U') 105 ); 106 } 107 108 /** 109 * Test new father names 110 * 111 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 112 * 113 * @return void 114 */ 115 public function testNewFatherNames() 116 { 117 $this->assertSame( 118 [ 119 'NAME' => 'Einar', 120 'GIVN' => 'Einar', 121 ], 122 $this->surname_tradition->newParentNames('Jon Einarsson', 'M') 123 ); 124 } 125 126 /** 127 * Test new mother names 128 * 129 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 130 * 131 * @return void 132 */ 133 public function testNewMotherNames() 134 { 135 $this->assertSame( 136 [], 137 $this->surname_tradition->newParentNames('Jon Einarsson', 'F') 138 ); 139 } 140 141 /** 142 * Test new parent names 143 * 144 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 145 * 146 * @return void 147 */ 148 public function testNewParentNames() 149 { 150 $this->assertSame( 151 [], 152 $this->surname_tradition->newParentNames('Jon Einarsson', 'U') 153 ); 154 } 155 156 /** 157 * Test new husband names 158 * 159 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 160 * 161 * @return void 162 */ 163 public function testNewHusbandNames() 164 { 165 $this->assertSame( 166 [], 167 $this->surname_tradition->newSpouseNames('Eva Stefansdottir', 'M') 168 ); 169 } 170 171 /** 172 * Test new wife names 173 * 174 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 175 * 176 * @return void 177 */ 178 public function testNewWifeNames() 179 { 180 $this->assertSame( 181 [], 182 $this->surname_tradition->newSpouseNames('Jon Einarsson', 'F') 183 ); 184 } 185 186 /** 187 * Test new spouse names 188 * 189 * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition 190 * 191 * @return void 192 */ 193 public function testNewSpouseNames() 194 { 195 $this->assertSame( 196 [], 197 $this->surname_tradition->newSpouseNames('Jon Einarsson', 'U') 198 ); 199 } 200} 201