. */ declare(strict_types=1); namespace Fisharebest\Webtrees\SurnameTradition; /** * Test harness for the class SpanishSurnameTradition */ class IcelandicSurnameTraditionTest extends \Fisharebest\Webtrees\TestCase { /** @var SurnameTraditionInterface */ private $surname_tradition; /** * Prepare the environment for these tests * * @return void */ protected function setUp(): void { parent::setUp(); $this->surname_tradition = new IcelandicSurnameTradition(); } /** * Test whether married surnames are used * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testMarriedSurnames(): void { $this->assertFalse($this->surname_tradition->hasMarriedNames()); } /** * Test whether surnames are used * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testSurnames(): void { $this->assertFalse($this->surname_tradition->hasSurnames()); } /** * Test new son names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewSonNames(): void { $this->assertSame( ['NAME' => 'Jonsson'], $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'M') ); } /** * Test new daughter names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewDaughterNames(): void { $this->assertSame( ['NAME' => 'Jonsdottir'], $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'F') ); } /** * Test new child names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewChildNames(): void { $this->assertSame( [], $this->surname_tradition->newChildNames('Jon Einarsson', 'Eva Stefansdottir', 'U') ); } /** * Test new father names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewFatherNames(): void { $this->assertSame( [ 'NAME' => 'Einar', 'GIVN' => 'Einar', ], $this->surname_tradition->newParentNames('Jon Einarsson', 'M') ); } /** * Test new mother names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewMotherNames(): void { $this->assertSame( [], $this->surname_tradition->newParentNames('Jon Einarsson', 'F') ); } /** * Test new parent names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewParentNames(): void { $this->assertSame( [], $this->surname_tradition->newParentNames('Jon Einarsson', 'U') ); } /** * Test new husband names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewHusbandNames(): void { $this->assertSame( [], $this->surname_tradition->newSpouseNames('Eva Stefansdottir', 'M') ); } /** * Test new wife names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewWifeNames(): void { $this->assertSame( [], $this->surname_tradition->newSpouseNames('Jon Einarsson', 'F') ); } /** * Test new spouse names * * @covers \Fisharebest\Webtrees\SurnameTradition\IcelandicSurnameTradition * * @return void */ public function testNewSpouseNames(): void { $this->assertSame( [], $this->surname_tradition->newSpouseNames('Jon Einarsson', 'U') ); } }