1*ef21b467SGreg Roach<?php 2*ef21b467SGreg Roach 3*ef21b467SGreg Roach/** 4*ef21b467SGreg Roach * webtrees: online genealogy 5*ef21b467SGreg Roach * Copyright (C) 2015 webtrees development team 6*ef21b467SGreg Roach * This program is free software: you can redistribute it and/or modify 7*ef21b467SGreg Roach * it under the terms of the GNU General Public License as published by 8*ef21b467SGreg Roach * the Free Software Foundation, either version 3 of the License, or 9*ef21b467SGreg Roach * (at your option) any later version. 10*ef21b467SGreg Roach * This program is distributed in the hope that it will be useful, 11*ef21b467SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*ef21b467SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*ef21b467SGreg Roach * GNU General Public License for more details. 14*ef21b467SGreg Roach * You should have received a copy of the GNU General Public License 15*ef21b467SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>. 16*ef21b467SGreg Roach */ 17*ef21b467SGreg Roach 18*ef21b467SGreg Roachnamespace Fisharebest\Webtrees\Census; 19*ef21b467SGreg Roach 20*ef21b467SGreg Roach/** 21*ef21b467SGreg Roach * Test harness for the class CensusOfUnitedStates 22*ef21b467SGreg Roach */ 23*ef21b467SGreg Roachclass CensusOfUnitedStatesTest extends \PHPUnit_Framework_TestCase { 24*ef21b467SGreg Roach /** 25*ef21b467SGreg Roach * Test the census place 26*ef21b467SGreg Roach * 27*ef21b467SGreg Roach * @covers Fisharebest\Webtrees\Census\CensusOfUnitedStates 28*ef21b467SGreg Roach */ 29*ef21b467SGreg Roach public function testPlace() { 30*ef21b467SGreg Roach $census = new CensusOfUnitedStates; 31*ef21b467SGreg Roach 32*ef21b467SGreg Roach $this->assertSame('United States', $census->censusPlace()); 33*ef21b467SGreg Roach } 34*ef21b467SGreg Roach 35*ef21b467SGreg Roach /** 36*ef21b467SGreg Roach * Test the census dates 37*ef21b467SGreg Roach * 38*ef21b467SGreg Roach * @covers Fisharebest\Webtrees\Census\CensusOfUnitedStates 39*ef21b467SGreg Roach */ 40*ef21b467SGreg Roach public function testAllDates() { 41*ef21b467SGreg Roach $census = new CensusOfUnitedStates; 42*ef21b467SGreg Roach 43*ef21b467SGreg Roach $census_dates = $census->allCensusDates(); 44*ef21b467SGreg Roach 45*ef21b467SGreg Roach $this->assertCount(10, $census_dates); 46*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1850::class, $census_dates[0]); 47*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1860::class, $census_dates[1]); 48*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1870::class, $census_dates[2]); 49*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1880::class, $census_dates[3]); 50*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1890::class, $census_dates[4]); 51*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1900::class, $census_dates[5]); 52*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1910::class, $census_dates[6]); 53*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1920::class, $census_dates[7]); 54*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1930::class, $census_dates[8]); 55*ef21b467SGreg Roach $this->assertInstanceOf(CensusOfUnitedStates1940::class, $census_dates[9]); 56*ef21b467SGreg Roach } 57*ef21b467SGreg Roach} 58