1548ca0ddSGreg Roach<?php 2548ca0ddSGreg Roach/** 3548ca0ddSGreg Roach * webtrees: online genealogy 41062a142SGreg Roach * Copyright (C) 2018 webtrees development team 5548ca0ddSGreg Roach * This program is free software: you can redistribute it and/or modify 6548ca0ddSGreg Roach * it under the terms of the GNU General Public License as published by 7548ca0ddSGreg Roach * the Free Software Foundation, either version 3 of the License, or 8548ca0ddSGreg Roach * (at your option) any later version. 9548ca0ddSGreg Roach * This program is distributed in the hope that it will be useful, 10548ca0ddSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 11548ca0ddSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12548ca0ddSGreg Roach * GNU General Public License for more details. 13548ca0ddSGreg Roach * You should have received a copy of the GNU General Public License 14548ca0ddSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 15548ca0ddSGreg Roach */ 16548ca0ddSGreg Roachnamespace Fisharebest\Webtrees\Census; 17548ca0ddSGreg Roach 18548ca0ddSGreg Roach/** 19548ca0ddSGreg Roach * Test harness for the class CensusOfDenmark1803 20548ca0ddSGreg Roach */ 2184e2cf4eSGreg Roachclass CensusOfDenmark1803Test extends \Fisharebest\Webtrees\TestCase 22c1010edaSGreg Roach{ 23548ca0ddSGreg Roach /** 24548ca0ddSGreg Roach * Test the census place and date 25548ca0ddSGreg Roach * 2615d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1803 27*52348eb8SGreg Roach * 28*52348eb8SGreg Roach * @return void 29548ca0ddSGreg Roach */ 30c1010edaSGreg Roach public function testPlaceAndDate() 31c1010edaSGreg Roach { 32548ca0ddSGreg Roach $census = new CensusOfDenmark1803; 33548ca0ddSGreg Roach 34548ca0ddSGreg Roach $this->assertSame('Schleswig-Holstein, Deutschland', $census->censusPlace()); 35548ca0ddSGreg Roach $this->assertSame('01 FEB 1803', $census->censusDate()); 36548ca0ddSGreg Roach } 37548ca0ddSGreg Roach 38548ca0ddSGreg Roach /** 39548ca0ddSGreg Roach * Test the census columns 40548ca0ddSGreg Roach * 4115d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1803 4215d603e7SGreg Roach * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn 43*52348eb8SGreg Roach * 44*52348eb8SGreg Roach * @return void 45548ca0ddSGreg Roach */ 46c1010edaSGreg Roach public function testColumns() 47c1010edaSGreg Roach { 48548ca0ddSGreg Roach $census = new CensusOfDenmark1803; 49548ca0ddSGreg Roach $columns = $census->columns(); 50548ca0ddSGreg Roach 51548ca0ddSGreg Roach $this->assertCount(5, $columns); 52c314ecc9SGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); 53c314ecc9SGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); 54c314ecc9SGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); 55c314ecc9SGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); 56c314ecc9SGreg Roach $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); 57548ca0ddSGreg Roach 584c219c47SGreg Roach $this->assertSame('Navn', $columns[0]->abbreviation()); 594c219c47SGreg Roach $this->assertSame('Stilling i familien', $columns[1]->abbreviation()); 604c219c47SGreg Roach $this->assertSame('Alder', $columns[2]->abbreviation()); 614c219c47SGreg Roach $this->assertSame('Civilstand', $columns[3]->abbreviation()); 624c219c47SGreg Roach $this->assertSame('Erhverv', $columns[4]->abbreviation()); 63548ca0ddSGreg Roach 644c219c47SGreg Roach $this->assertSame('', $columns[0]->title()); 654c219c47SGreg Roach $this->assertSame('', $columns[1]->title()); 664c219c47SGreg Roach $this->assertSame('', $columns[2]->title()); 674c219c47SGreg Roach $this->assertSame('', $columns[3]->title()); 684c219c47SGreg Roach $this->assertSame('', $columns[4]->title()); 69548ca0ddSGreg Roach } 70548ca0ddSGreg Roach} 71