. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Individual; use Illuminate\Support\Collection; /** * Test harness for the class CensusColumnFullName */ class CensusColumnFullNameTest extends \Fisharebest\Webtrees\TestCase { /** * @covers \Fisharebest\Webtrees\Census\CensusColumnFullName * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn * * @return void */ public function testFullName(): void { $individual = $this->createMock(Individual::class); $individual->method('getAllNames')->willReturn([['full' => 'Joe Bloggs']]); $individual->method('spouseFamilies')->willReturn(new Collection()); $census = $this->createMock(CensusInterface::class); $census->method('censusDate')->willReturn(''); $column = new CensusColumnFullName($census, '', ''); $this->assertSame('Joe Bloggs', $column->generate($individual, $individual)); } }