. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Date; use Fisharebest\Webtrees\Date\GregorianDate; use Fisharebest\Webtrees\Individual; /** * Test harness for the class CensusColumnBirthDayDotMonthYearTest */ class CensusColumnBirthDayDotMonthYearTest extends \Fisharebest\Webtrees\TestCase { /** * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDayDotMonthYearTest * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testGenerateColumn(): void { $cal_date = $this->createMock(GregorianDate::class); $cal_date->method('format')->willReturn('30. June 1832'); $date = $this->createMock(Date::class); $date->method('minimumJulianDay')->willReturn(2390364); $date->method('maximumJulianDay')->willReturn(2390364); $date->method('minimumDate')->willReturn($cal_date); $individual = $this->createMock(Individual::class); $individual->method('getBirthDate')->willReturn($date); $census = $this->createMock(CensusInterface::class); $census->method('censusDate')->willReturn('30 JUN 1832'); $column = new CensusColumnBirthDayDotMonthYear($census, '', ''); $this->assertSame('30. June 1832', $column->generate($individual, $individual)); } }