. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\TestCase; /** * Test harness for the class CensusOfUnitedStates */ class CensusOfUnitedStatesTest extends TestCase { /** * Test the census place * * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates * * @return void */ public function testPlace(): void { $census = new CensusOfUnitedStates(); $this->assertSame('United States', $census->censusPlace()); } /** * Test the census language * * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic * * @return void */ public function testLanguage(): void { $census = new CensusOfUnitedStates(); $this->assertSame('en-US', $census->censusLanguage()); } /** * Test the census dates * * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates * * @return void */ public function testAllDates(): void { $census = new CensusOfUnitedStates(); $census_dates = $census->allCensusDates(); $this->assertCount(16, $census_dates); $this->assertInstanceOf(CensusOfUnitedStates1790::class, $census_dates[0]); $this->assertInstanceOf(CensusOfUnitedStates1800::class, $census_dates[1]); $this->assertInstanceOf(CensusOfUnitedStates1810::class, $census_dates[2]); $this->assertInstanceOf(CensusOfUnitedStates1820::class, $census_dates[3]); $this->assertInstanceOf(CensusOfUnitedStates1830::class, $census_dates[4]); $this->assertInstanceOf(CensusOfUnitedStates1840::class, $census_dates[5]); $this->assertInstanceOf(CensusOfUnitedStates1850::class, $census_dates[6]); $this->assertInstanceOf(CensusOfUnitedStates1860::class, $census_dates[7]); $this->assertInstanceOf(CensusOfUnitedStates1870::class, $census_dates[8]); $this->assertInstanceOf(CensusOfUnitedStates1880::class, $census_dates[9]); $this->assertInstanceOf(CensusOfUnitedStates1890::class, $census_dates[10]); $this->assertInstanceOf(CensusOfUnitedStates1900::class, $census_dates[11]); $this->assertInstanceOf(CensusOfUnitedStates1910::class, $census_dates[12]); $this->assertInstanceOf(CensusOfUnitedStates1920::class, $census_dates[13]); $this->assertInstanceOf(CensusOfUnitedStates1930::class, $census_dates[14]); $this->assertInstanceOf(CensusOfUnitedStates1940::class, $census_dates[15]); } }