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