. */ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance */ class CensusOfFranceTest extends \PHPUnit_Framework_TestCase { /** * Test the census place * * @covers Fisharebest\Webtrees\Census\CensusOfFrance */ public function testPlace() { $census = new CensusOfFrance; $this->assertSame('France', $census->censusPlace()); } /** * Test the census dates * * @covers Fisharebest\Webtrees\Census\CensusOfFrance */ public function testAllDates() { $census = new CensusOfFrance; $census_dates = $census->allCensusDates(); $this->assertCount(16, $census_dates); $this->assertInstanceOf(CensusOfFrance1836::class, $census_dates[0]); $this->assertInstanceOf(CensusOfFrance1841::class, $census_dates[1]); $this->assertInstanceOf(CensusOfFrance1846::class, $census_dates[2]); $this->assertInstanceOf(CensusOfFrance1851::class, $census_dates[3]); $this->assertInstanceOf(CensusOfFrance1856::class, $census_dates[4]); $this->assertInstanceOf(CensusOfFrance1861::class, $census_dates[5]); $this->assertInstanceOf(CensusOfFrance1866::class, $census_dates[6]); $this->assertInstanceOf(CensusOfFrance1872::class, $census_dates[7]); $this->assertInstanceOf(CensusOfFrance1876::class, $census_dates[8]); $this->assertInstanceOf(CensusOfFrance1881::class, $census_dates[9]); $this->assertInstanceOf(CensusOfFrance1886::class, $census_dates[10]); $this->assertInstanceOf(CensusOfFrance1891::class, $census_dates[11]); $this->assertInstanceOf(CensusOfFrance1896::class, $census_dates[12]); $this->assertInstanceOf(CensusOfFrance1901::class, $census_dates[13]); $this->assertInstanceOf(CensusOfFrance1906::class, $census_dates[14]); $this->assertInstanceOf(CensusOfFrance1911::class, $census_dates[15]); } }