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