. */ namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\Individual; use Mockery; /** * Test harness for the class CensusColumnFullName */ class CensusColumnFullNameTest extends \PHPUnit_Framework_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('getFullName')->andReturn('Joe Bloggs'); $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); $column = new CensusColumnFullName($census, '', ''); $this->assertSame('Joe Bloggs', $column->generate($individual)); } }