. */ 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('Fisharebest\Webtrees\Census\CensusOfUnitedStates1850', $census_dates[0]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1860', $census_dates[1]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1870', $census_dates[2]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1880', $census_dates[3]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1890', $census_dates[4]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1900', $census_dates[5]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1910', $census_dates[6]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1920', $census_dates[7]); $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1930', $census_dates[8]); } }