. */ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates */ class CensusOfUnitedStatesTest extends \PHPUnit_Framework_TestCase { /** * Test the census place * * @covers Fisharebest\Webtrees\Census\CensusOfUnitedStates */ public function testPlace() { $census = new CensusOfUnitedStates; $this->assertSame('United States', $census->censusPlace()); } /** * Test the census dates * * @covers Fisharebest\Webtrees\Census\CensusOfUnitedStates */ public function testAllDates() { $census = new CensusOfUnitedStates; $census_dates = $census->allCensusDates(); $this->assertCount(9, $census_dates); $this->assertInstanceOf(CensusOfUnitedStates1850::class, $census_dates[0]); $this->assertInstanceOf(CensusOfUnitedStates1860::class, $census_dates[1]); $this->assertInstanceOf(CensusOfUnitedStates1870::class, $census_dates[2]); $this->assertInstanceOf(CensusOfUnitedStates1880::class, $census_dates[3]); $this->assertInstanceOf(CensusOfUnitedStates1890::class, $census_dates[4]); $this->assertInstanceOf(CensusOfUnitedStates1900::class, $census_dates[5]); $this->assertInstanceOf(CensusOfUnitedStates1910::class, $census_dates[6]); $this->assertInstanceOf(CensusOfUnitedStates1920::class, $census_dates[7]); $this->assertInstanceOf(CensusOfUnitedStates1930::class, $census_dates[8]); } }