. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Individual; use Mockery; /** * Test harness for the class CensusColumnFullName */ class CensusColumnFullNameTest extends \Fisharebest\Webtrees\TestCase { /** * Delete mock objects * * @return void */ public function tearDown() { Mockery::close(); } /** * @covers \Fisharebest\Webtrees\Census\CensusColumnFullName * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testFullName(): void { $individual = Mockery::mock(Individual::class); $individual->shouldReceive('getAllNames')->andReturn([['full' => 'Joe Bloggs']]); $individual->shouldReceive('getSpouseFamilies')->andReturn([]); $census = Mockery::mock(CensusInterface::class); $census->shouldReceive('censusDate')->andReturn(''); $column = new CensusColumnFullName($census, '', ''); $this->assertSame('Joe Bloggs', $column->generate($individual, $individual)); } }