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