. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Census; use Fisharebest\Webtrees\TestCase; /** * Test harness for the class CensusOfScotland */ class CensusOfScotlandTest extends TestCase { /** * Test the census place * * @covers \Fisharebest\Webtrees\Census\CensusOfScotland * * @return void */ public function testPlace(): void { $census = new CensusOfScotland(); $this->assertSame('Scotland', $census->censusPlace()); } /** * Test the census dates * * @covers \Fisharebest\Webtrees\Census\CensusOfScotland * * @return void */ public function testAllDates(): void { $census = new CensusOfScotland(); $census_dates = $census->allCensusDates(); $this->assertCount(8, $census_dates); $this->assertInstanceOf(CensusOfScotland1841::class, $census_dates[0]); $this->assertInstanceOf(CensusOfScotland1851::class, $census_dates[1]); $this->assertInstanceOf(CensusOfScotland1861::class, $census_dates[2]); $this->assertInstanceOf(CensusOfScotland1871::class, $census_dates[3]); $this->assertInstanceOf(CensusOfScotland1881::class, $census_dates[4]); $this->assertInstanceOf(CensusOfScotland1891::class, $census_dates[5]); $this->assertInstanceOf(CensusOfScotland1901::class, $census_dates[6]); $this->assertInstanceOf(CensusOfScotland1911::class, $census_dates[7]); } }