xref: /webtrees/tests/app/Census/CensusOfDenmarkTest.php (revision 101af0b4f69bbf5e23334866418f6f0c7529dcbc)
1ef21b467SGreg Roach<?php
2ef21b467SGreg Roach
3ef21b467SGreg Roach/**
4ef21b467SGreg Roach * webtrees: online genealogy
5ef21b467SGreg Roach * Copyright (C) 2015 webtrees development team
6ef21b467SGreg Roach * This program is free software: you can redistribute it and/or modify
7ef21b467SGreg Roach * it under the terms of the GNU General Public License as published by
8ef21b467SGreg Roach * the Free Software Foundation, either version 3 of the License, or
9ef21b467SGreg Roach * (at your option) any later version.
10ef21b467SGreg Roach * This program is distributed in the hope that it will be useful,
11ef21b467SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
12ef21b467SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13ef21b467SGreg Roach * GNU General Public License for more details.
14ef21b467SGreg Roach * You should have received a copy of the GNU General Public License
15ef21b467SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
16ef21b467SGreg Roach */
17ef21b467SGreg Roach
18ef21b467SGreg Roachnamespace Fisharebest\Webtrees\Census;
19ef21b467SGreg Roach
20ef21b467SGreg Roach/**
21ef21b467SGreg Roach * Test harness for the class CensusOfDenmark
22ef21b467SGreg Roach */
23ef21b467SGreg Roachclass CensusOfDenmarkTest extends \PHPUnit_Framework_TestCase {
24ef21b467SGreg Roach	/**
25ef21b467SGreg Roach	 * Test the census place
26ef21b467SGreg Roach	 *
27ef21b467SGreg Roach	 * @covers Fisharebest\Webtrees\Census\CensusOfDenmark
28ef21b467SGreg Roach	 */
29ef21b467SGreg Roach	public function testPlace() {
30ef21b467SGreg Roach		$census = new CensusOfDenmark;
31ef21b467SGreg Roach
32ef21b467SGreg Roach		$this->assertSame('Danmark', $census->censusPlace());
33ef21b467SGreg Roach	}
34ef21b467SGreg Roach
35ef21b467SGreg Roach	/**
36ef21b467SGreg Roach	 * Test the census dates
37ef21b467SGreg Roach	 *
38ef21b467SGreg Roach	 * @covers Fisharebest\Webtrees\Census\CensusOfDenmark
39ef21b467SGreg Roach	 */
40ef21b467SGreg Roach	public function testAllDates() {
41ef21b467SGreg Roach		$census  = new CensusOfDenmark;
42ef21b467SGreg Roach
43ef21b467SGreg Roach		$census_dates = $census->allCensusDates();
44ef21b467SGreg Roach
45*101af0b4SGreg Roach		$this->assertCount(24, $census_dates);
46ef21b467SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1787::class, $census_dates[0]);
47ef21b467SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1801::class, $census_dates[1]);
48*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1803::class, $census_dates[2]);
49*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1834::class, $census_dates[3]);
50*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1835::class, $census_dates[4]);
51*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1840::class, $census_dates[5]);
52*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1845::class, $census_dates[6]);
53*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1850::class, $census_dates[7]);
54*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1855::class, $census_dates[8]);
55*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1860::class, $census_dates[9]);
56*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1870::class, $census_dates[10]);
57*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1880::class, $census_dates[11]);
58*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1885::class, $census_dates[12]);
59*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1890::class, $census_dates[13]);
60*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1895::class, $census_dates[14]);
61*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1901::class, $census_dates[15]);
62*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1906::class, $census_dates[16]);
63*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1911::class, $census_dates[17]);
64*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1916::class, $census_dates[18]);
65*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1921::class, $census_dates[19]);
66*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1925::class, $census_dates[20]);
67*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1930::class, $census_dates[21]);
68*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1940::class, $census_dates[22]);
69*101af0b4SGreg Roach		$this->assertInstanceOf(CensusOfDenmark1950::class, $census_dates[23]);
70ef21b467SGreg Roach	}
71ef21b467SGreg Roach}
72