. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Date; use Fisharebest\Webtrees\Individual; use Fisharebest\Webtrees\TestCase; /** * Test harness for the class CensusColumnAge */ class CensusColumnAgeTest extends TestCase { /** * @covers \Fisharebest\Webtrees\Census\CensusColumnAge * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testGenerateColumn(): void { $individual = $this->createMock(Individual::class); $individual->method('getEstimatedBirthDate')->willReturn(new Date('01 JAN 1800')); $census = $this->createMock(CensusInterface::class); $census->method('censusDate')->willReturn('30 JUN 1832'); $column = new CensusColumnAge($census, '', ''); $this->assertSame('32', $column->generate($individual, $individual)); } }