. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Individual; /** * Test harness for the class CensusColumnSexMK */ class CensusColumnSexMKTest extends \Fisharebest\Webtrees\TestCase { /** * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testMale(): void { $individual = $this->createMock(Individual::class); $individual->method('sex')->willReturn('M'); $census = $this->createMock(CensusInterface::class); $column = new CensusColumnSexMK($census, '', ''); $this->assertSame('M', $column->generate($individual, $individual)); } /** * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testFeale(): void { $individual = $this->createMock(Individual::class); $individual->method('sex')->willReturn('F'); $census = $this->createMock(CensusInterface::class); $column = new CensusColumnSexMK($census, '', ''); $this->assertSame('K', $column->generate($individual, $individual)); } /** * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testUnknownSex(): void { $individual = $this->createMock(Individual::class); $individual->method('sex')->willReturn('U'); $census = $this->createMock(CensusInterface::class); $column = new CensusColumnSexMK($census, '', ''); $this->assertSame('', $column->generate($individual, $individual)); } }