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