. */ 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(); self::assertSame('Scotland', $census->censusPlace()); } /** * Test the census language * * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic * * @return void */ public function testLanguage(): void { $census = new CensusOfScotland(); self::assertSame('en-GB', $census->censusLanguage()); } /** * Test the census dates * * @covers \Fisharebest\Webtrees\Census\CensusOfScotland * * @return void */ public function testAllDates(): void { $census = new CensusOfScotland(); $census_dates = $census->allCensusDates(); self::assertCount(8, $census_dates); self::assertInstanceOf(CensusOfScotland1841::class, $census_dates[0]); self::assertInstanceOf(CensusOfScotland1851::class, $census_dates[1]); self::assertInstanceOf(CensusOfScotland1861::class, $census_dates[2]); self::assertInstanceOf(CensusOfScotland1871::class, $census_dates[3]); self::assertInstanceOf(CensusOfScotland1881::class, $census_dates[4]); self::assertInstanceOf(CensusOfScotland1891::class, $census_dates[5]); self::assertInstanceOf(CensusOfScotland1901::class, $census_dates[6]); self::assertInstanceOf(CensusOfScotland1911::class, $census_dates[7]); } }