diff options
Diffstat (limited to 'tests/app/Census')
82 files changed, 3479 insertions, 0 deletions
diff --git a/tests/app/Census/CensusColumnAgeFemale5YearsTest.php b/tests/app/Census/CensusColumnAgeFemale5YearsTest.php new file mode 100644 index 0000000000..534e390a60 --- /dev/null +++ b/tests/app/Census/CensusColumnAgeFemale5YearsTest.php @@ -0,0 +1,134 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnAgeFemale5Years + */ +class CensusColumnAgeFemale5YearsTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnAgeFemale5Years($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + + $column = new CensusColumnAgeFemale5Years($census); + + $this->assertSame('30', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + + $column = new CensusColumnAgeFemale5Years($census); + + $this->assertSame('30', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + + $column = new CensusColumnAgeFemale5Years($census); + + $this->assertSame('0', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanFifteenYears() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1814'); + + $column = new CensusColumnAgeFemale5Years($census); + + $this->assertSame('14', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testRoundedDownToFiveYears() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1844'); + + $column = new CensusColumnAgeFemale5Years($census); + + $this->assertSame('40', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusColumnAgeFemaleTest.php b/tests/app/Census/CensusColumnAgeFemaleTest.php new file mode 100644 index 0000000000..14c28230cf --- /dev/null +++ b/tests/app/Census/CensusColumnAgeFemaleTest.php @@ -0,0 +1,100 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnAgeFemale + */ +class CensusColumnAgeFemaleTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnAgeFemale($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + + $column = new CensusColumnAgeFemale($census); + + $this->assertSame('32', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + + $column = new CensusColumnAgeFemale($census); + + $this->assertSame('32', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + + $column = new CensusColumnAgeFemale($census); + + $this->assertSame('0', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusColumnAgeMale5YearsTest.php b/tests/app/Census/CensusColumnAgeMale5YearsTest.php new file mode 100644 index 0000000000..b0115e409e --- /dev/null +++ b/tests/app/Census/CensusColumnAgeMale5YearsTest.php @@ -0,0 +1,134 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnAgeMale5Years5Years + */ +class CensusColumnAgeMale5YearsTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + + $column = new CensusColumnAgeMale5Years($census); + + $this->assertSame('30', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnAgeMale5Years($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + + $column = new CensusColumnAgeMale5Years($census); + + $this->assertSame('30', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + + $column = new CensusColumnAgeMale5Years($census); + + $this->assertSame('0', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanFifteenYears() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1814'); + + $column = new CensusColumnAgeMale5Years($census); + + $this->assertSame('14', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testRoundedDownToFiveYears() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1844'); + + $column = new CensusColumnAgeMale5Years($census); + + $this->assertSame('40', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusColumnAgeMaleTest.php b/tests/app/Census/CensusColumnAgeMaleTest.php new file mode 100644 index 0000000000..bd3f275437 --- /dev/null +++ b/tests/app/Census/CensusColumnAgeMaleTest.php @@ -0,0 +1,100 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnAgeMale + */ +class CensusColumnAgeMaleTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + + $column = new CensusColumnAgeMale($census); + + $this->assertSame('32', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('F'); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnAgeMale($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + + $column = new CensusColumnAgeMale($census); + + $this->assertSame('32', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + + $column = new CensusColumnAgeMale($census); + + $this->assertSame('0', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusColumnBornForeignPartsTest.php b/tests/app/Census/CensusColumnBornForeignPartsTest.php new file mode 100644 index 0000000000..4bc020c0ae --- /dev/null +++ b/tests/app/Census/CensusColumnBornForeignPartsTest.php @@ -0,0 +1,355 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Fact; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnBornForeignParts + */ +class CensusColumnBornForeignPartsTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusEngland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('London, England'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('England'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusEngland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Cardiff, Wales'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('England'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusEngland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Edinburgh, Scotland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('England'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('S', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusEngland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Dublin, Ireland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('England'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('I', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusEngland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Elbonia'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('England'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('F', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusIreland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('London, England'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('E', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusIreland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Cardiff, Wales'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('E', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusIreland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Edinburgh, Scotland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('S', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusIreland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Dublin, Ireland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusIreland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Elbonia'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('F', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusScotland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('London, England'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('E', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusScotland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Cardiff, Wales'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('E', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusScotland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Edinburgh, Scotland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusScotland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Dublin, Ireland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('I', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusScotland() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Elbonia'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('F', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusWales() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('London, England'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Wales'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusWales() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Cardiff, Wales'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Wales'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusWales() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Edinburgh, Scotland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Wales'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('S', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusWales() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Dublin, Ireland'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Wales'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('I', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusWales() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getBirthPlace')->andReturn('Elbonia'); + + $census = Mockery::mock(CensusInterface::class); + $census->shouldReceive('censusPlace')->andReturn('Wales'); + + $column = new CensusColumnBornForeignParts($census); + + $this->assertSame('F', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusColumnBornSameCountyTest.php b/tests/app/Census/CensusColumnBornSameCountyTest.php new file mode 100644 index 0000000000..f985461a54 --- /dev/null +++ b/tests/app/Census/CensusColumnBornSameCountyTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Fact; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnBornSameCounty + */ +class CensusColumnBornSameCountyTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnBornSameCounty + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testDefault() { + $individual = Mockery::mock(Individual::class); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnBornSameCounty($census); + + $this->assertSame('', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusColumnFullNameTest.php b/tests/app/Census/CensusColumnFullNameTest.php new file mode 100644 index 0000000000..460f2a8b14 --- /dev/null +++ b/tests/app/Census/CensusColumnFullNameTest.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnFullName + */ +class CensusColumnFullNameTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnFullName + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFullName() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getFullName')->andReturn('Joe Bloggs'); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnFullName($census); + + $this->assertSame('Joe Bloggs', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusColumnOccupationTest.php b/tests/app/Census/CensusColumnOccupationTest.php new file mode 100644 index 0000000000..5852e38012 --- /dev/null +++ b/tests/app/Census/CensusColumnOccupationTest.php @@ -0,0 +1,68 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +use Fisharebest\Webtrees\Date; +use Fisharebest\Webtrees\Fact; +use Fisharebest\Webtrees\Individual; +use Mockery; + +/** + * Test harness for the class CensusColumnOccupation + */ +class CensusColumnOccupationTest extends \PHPUnit_Framework_TestCase { + /** + * Delete mock objects + */ + public function tearDown() { + Mockery::close(); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnOccupation + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoOccupation() { + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getFacts')->withArgs(['OCCU'])->andReturn([]); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnOccupation($census); + + $this->assertSame('', $column->generate($individual)); + } + + /** + * @covers Fisharebest\Webtrees\Census\CensusColumnOccupation + * @covers Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testOccupation() { + $fact = Mockery::mock(Fact::class); + $fact->shouldReceive('getValue')->andReturn('Farmer'); + + $individual = Mockery::mock(Individual::class); + $individual->shouldReceive('getFacts')->withArgs(['OCCU'])->andReturn([$fact]); + + $census = Mockery::mock(CensusInterface::class); + + $column = new CensusColumnOccupation($census); + + $this->assertSame('Farmer', $column->generate($individual)); + } +} diff --git a/tests/app/Census/CensusOfDenmark1787Test.php b/tests/app/Census/CensusOfDenmark1787Test.php new file mode 100644 index 0000000000..7d89a7557d --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1787Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1787 + */ +class CensusOfDenmark1787Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1787; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 JUL 1787', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1801Test.php b/tests/app/Census/CensusOfDenmark1801Test.php new file mode 100644 index 0000000000..f6c12c6892 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1801Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1801 + */ +class CensusOfDenmark1801Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1801; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1801', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1834Test.php b/tests/app/Census/CensusOfDenmark1834Test.php new file mode 100644 index 0000000000..340f9cd80d --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1834Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1834 + */ +class CensusOfDenmark1834Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1834; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('18 FEB 1834', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1840Test.php b/tests/app/Census/CensusOfDenmark1840Test.php new file mode 100644 index 0000000000..5eca2604dc --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1840Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1840 + */ +class CensusOfDenmark1840Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1840; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1840', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1845Test.php b/tests/app/Census/CensusOfDenmark1845Test.php new file mode 100644 index 0000000000..59dfc9f58f --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1845Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1845 + */ +class CensusOfDenmark1845Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1845; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1845', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1850Test.php b/tests/app/Census/CensusOfDenmark1850Test.php new file mode 100644 index 0000000000..b00ed6cb45 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1850Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1850 + */ +class CensusOfDenmark1850Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1850; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1850', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1855Test.php b/tests/app/Census/CensusOfDenmark1855Test.php new file mode 100644 index 0000000000..793f5d77e4 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1855Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1855 + */ +class CensusOfDenmark1855Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1855; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1855', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1860Test.php b/tests/app/Census/CensusOfDenmark1860Test.php new file mode 100644 index 0000000000..20a53185ba --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1860Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1860 + */ +class CensusOfDenmark1860Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1860; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1860', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1870Test.php b/tests/app/Census/CensusOfDenmark1870Test.php new file mode 100644 index 0000000000..fff0e6e140 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1870Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1870 + */ +class CensusOfDenmark1870Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1870; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1870', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1880Test.php b/tests/app/Census/CensusOfDenmark1880Test.php new file mode 100644 index 0000000000..895d1a7bc0 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1880Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1880 + */ +class CensusOfDenmark1880Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1880; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1880', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1890Test.php b/tests/app/Census/CensusOfDenmark1890Test.php new file mode 100644 index 0000000000..c522d4753f --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1890Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1890 + */ +class CensusOfDenmark1890Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1890; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1890', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1901Test.php b/tests/app/Census/CensusOfDenmark1901Test.php new file mode 100644 index 0000000000..4eb17f00af --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1901Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1901 + */ +class CensusOfDenmark1901Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1901; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1901', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1906Test.php b/tests/app/Census/CensusOfDenmark1906Test.php new file mode 100644 index 0000000000..2bffeced58 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1906Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1906 + */ +class CensusOfDenmark1906Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1906; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1906', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1911Test.php b/tests/app/Census/CensusOfDenmark1911Test.php new file mode 100644 index 0000000000..491795af69 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1911Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1911 + */ +class CensusOfDenmark1911Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1911; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1911', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1916Test.php b/tests/app/Census/CensusOfDenmark1916Test.php new file mode 100644 index 0000000000..c9b9715a44 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1916Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1916 + */ +class CensusOfDenmark1916Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1916; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1916', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1921Test.php b/tests/app/Census/CensusOfDenmark1921Test.php new file mode 100644 index 0000000000..3f3e82dc0b --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1921Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1921 + */ +class CensusOfDenmark1921Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1921; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1921', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1925Test.php b/tests/app/Census/CensusOfDenmark1925Test.php new file mode 100644 index 0000000000..d5b9c6e22d --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1925Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1925 + */ +class CensusOfDenmark1925Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1925; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('05 NOV 1925', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfDenmark1930Test.php b/tests/app/Census/CensusOfDenmark1930Test.php new file mode 100644 index 0000000000..9f42a0ac28 --- /dev/null +++ b/tests/app/Census/CensusOfDenmark1930Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfDenmark1930 + */ +class CensusOfDenmark1930Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfDenmark1930; + + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('05 NOV 1930', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfEngland1841Test.php b/tests/app/Census/CensusOfEngland1841Test.php new file mode 100644 index 0000000000..2d2877b09a --- /dev/null +++ b/tests/app/Census/CensusOfEngland1841Test.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1841 + */ +class CensusOfEngland1841Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1841; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('06 MAY 1841', $census->censusDate()); + } + + /** + * Test the census place and date + */ + public function testColumns() { + $census = new CensusOfEngland1841; + $columns = $census->columns(); + + $this->assertCount(6, $columns); + $this->assertInstanceOf(CensusColumnFullName::class, $columns[0]); + $this->assertInstanceOf(CensusColumnAgeMale5Years::class, $columns[1]); + $this->assertInstanceOf(CensusColumnAgeFemale5Years::class, $columns[2]); + $this->assertInstanceOf(CensusColumnOccupation::class, $columns[3]); + $this->assertInstanceOf(CensusColumnBornSameCounty::class, $columns[4]); + $this->assertInstanceOf(CensusColumnBornForeignParts::class, $columns[5]); + } +} diff --git a/tests/app/Census/CensusOfEngland1851Test.php b/tests/app/Census/CensusOfEngland1851Test.php new file mode 100644 index 0000000000..8987cd24d0 --- /dev/null +++ b/tests/app/Census/CensusOfEngland1851Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1851 + */ +class CensusOfEngland1851Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1851; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('30 MAR 1851', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfEngland1861Test.php b/tests/app/Census/CensusOfEngland1861Test.php new file mode 100644 index 0000000000..9b63284c32 --- /dev/null +++ b/tests/app/Census/CensusOfEngland1861Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1861 + */ +class CensusOfEngland1861Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1861; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('07 MAR 1861', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfEngland1871Test.php b/tests/app/Census/CensusOfEngland1871Test.php new file mode 100644 index 0000000000..9fe42bfb7f --- /dev/null +++ b/tests/app/Census/CensusOfEngland1871Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1871 + */ +class CensusOfEngland1871Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1871; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('02 MAR 1871', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfEngland1881Test.php b/tests/app/Census/CensusOfEngland1881Test.php new file mode 100644 index 0000000000..20cf30b53e --- /dev/null +++ b/tests/app/Census/CensusOfEngland1881Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1881 + */ +class CensusOfEngland1881Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1881; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('03 MAR 1881', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfEngland1891Test.php b/tests/app/Census/CensusOfEngland1891Test.php new file mode 100644 index 0000000000..98b9ead58d --- /dev/null +++ b/tests/app/Census/CensusOfEngland1891Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1891 + */ +class CensusOfEngland1891Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1891; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('05 MAR 1891', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfEngland1901Test.php b/tests/app/Census/CensusOfEngland1901Test.php new file mode 100644 index 0000000000..e9a18f9365 --- /dev/null +++ b/tests/app/Census/CensusOfEngland1901Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1901 + */ +class CensusOfEngland1901Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1901; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('31 MAR 1901', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfEngland1911Test.php b/tests/app/Census/CensusOfEngland1911Test.php new file mode 100644 index 0000000000..73c4c0c42d --- /dev/null +++ b/tests/app/Census/CensusOfEngland1911Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfEngland1911 + */ +class CensusOfEngland1911Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfEngland1911; + + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('02 MAR 1911', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1836Test.php b/tests/app/Census/CensusOfFrance1836Test.php new file mode 100644 index 0000000000..de5598a337 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1836Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1836 + */ +class CensusOfFrance1836Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1836; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1836', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1841Test.php b/tests/app/Census/CensusOfFrance1841Test.php new file mode 100644 index 0000000000..14352dd96f --- /dev/null +++ b/tests/app/Census/CensusOfFrance1841Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1841 + */ +class CensusOfFrance1841Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1841; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1841', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1846Test.php b/tests/app/Census/CensusOfFrance1846Test.php new file mode 100644 index 0000000000..b4f1a0b0d3 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1846Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1846 + */ +class CensusOfFrance1846Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1846; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1846', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1851Test.php b/tests/app/Census/CensusOfFrance1851Test.php new file mode 100644 index 0000000000..81dc3aa2fd --- /dev/null +++ b/tests/app/Census/CensusOfFrance1851Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1851 + */ +class CensusOfFrance1851Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1851; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1851', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1856Test.php b/tests/app/Census/CensusOfFrance1856Test.php new file mode 100644 index 0000000000..b0d5ff8af3 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1856Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1856 + */ +class CensusOfFrance1856Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1856; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1856', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1861Test.php b/tests/app/Census/CensusOfFrance1861Test.php new file mode 100644 index 0000000000..d91b7a20c4 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1861Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1861 + */ +class CensusOfFrance1861Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1861; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1861', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1866Test.php b/tests/app/Census/CensusOfFrance1866Test.php new file mode 100644 index 0000000000..f68858cac6 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1866Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1866 + */ +class CensusOfFrance1866Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1866; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1866', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1872Test.php b/tests/app/Census/CensusOfFrance1872Test.php new file mode 100644 index 0000000000..096920db1d --- /dev/null +++ b/tests/app/Census/CensusOfFrance1872Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1872 + */ +class CensusOfFrance1872Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1872; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1872', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1876Test.php b/tests/app/Census/CensusOfFrance1876Test.php new file mode 100644 index 0000000000..dd07d7f3ab --- /dev/null +++ b/tests/app/Census/CensusOfFrance1876Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1876 + */ +class CensusOfFrance1876Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1876; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1876', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1881Test.php b/tests/app/Census/CensusOfFrance1881Test.php new file mode 100644 index 0000000000..200939b66b --- /dev/null +++ b/tests/app/Census/CensusOfFrance1881Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1881 + */ +class CensusOfFrance1881Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1881; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1881', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1886Test.php b/tests/app/Census/CensusOfFrance1886Test.php new file mode 100644 index 0000000000..a64e2fb999 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1886Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1886 + */ +class CensusOfFrance1886Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1886; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1886', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1891Test.php b/tests/app/Census/CensusOfFrance1891Test.php new file mode 100644 index 0000000000..e63565693e --- /dev/null +++ b/tests/app/Census/CensusOfFrance1891Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1891 + */ +class CensusOfFrance1891Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1891; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1891', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1896Test.php b/tests/app/Census/CensusOfFrance1896Test.php new file mode 100644 index 0000000000..f2aae0b39e --- /dev/null +++ b/tests/app/Census/CensusOfFrance1896Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1896 + */ +class CensusOfFrance1896Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1896; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1896', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1901Test.php b/tests/app/Census/CensusOfFrance1901Test.php new file mode 100644 index 0000000000..237b904c05 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1901Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1901 + */ +class CensusOfFrance1901Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1901; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1901', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1906Test.php b/tests/app/Census/CensusOfFrance1906Test.php new file mode 100644 index 0000000000..676838cc35 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1906Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1906 + */ +class CensusOfFrance1906Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1906; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1906', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfFrance1911Test.php b/tests/app/Census/CensusOfFrance1911Test.php new file mode 100644 index 0000000000..9a5c149163 --- /dev/null +++ b/tests/app/Census/CensusOfFrance1911Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfFrance1911 + */ +class CensusOfFrance1911Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfFrance1911; + + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('1911', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfScotland1841Test.php b/tests/app/Census/CensusOfScotland1841Test.php new file mode 100644 index 0000000000..dff476b4ed --- /dev/null +++ b/tests/app/Census/CensusOfScotland1841Test.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1841 + */ +class CensusOfScotland1841Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1841; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('06 MAY 1841', $census->censusDate()); + } + + /** + * Test the census place and date + */ + public function testColumns() { + $census = new CensusOfScotland1841; + $columns = $census->columns(); + + $this->assertCount(6, $columns); + $this->assertInstanceOf(CensusColumnFullName::class, $columns[0]); + $this->assertInstanceOf(CensusColumnAgeMale5Years::class, $columns[1]); + $this->assertInstanceOf(CensusColumnAgeFemale5Years::class, $columns[2]); + $this->assertInstanceOf(CensusColumnOccupation::class, $columns[3]); + $this->assertInstanceOf(CensusColumnBornSameCounty::class, $columns[4]); + $this->assertInstanceOf(CensusColumnBornForeignParts::class, $columns[5]); + } +} diff --git a/tests/app/Census/CensusOfScotland1851Test.php b/tests/app/Census/CensusOfScotland1851Test.php new file mode 100644 index 0000000000..d99c807705 --- /dev/null +++ b/tests/app/Census/CensusOfScotland1851Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1851 + */ +class CensusOfScotland1851Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1851; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('30 MAR 1851', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfScotland1861Test.php b/tests/app/Census/CensusOfScotland1861Test.php new file mode 100644 index 0000000000..9fc12fd0ec --- /dev/null +++ b/tests/app/Census/CensusOfScotland1861Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1861 + */ +class CensusOfScotland1861Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1861; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('07 MAR 1861', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfScotland1871Test.php b/tests/app/Census/CensusOfScotland1871Test.php new file mode 100644 index 0000000000..7fecab0542 --- /dev/null +++ b/tests/app/Census/CensusOfScotland1871Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1871 + */ +class CensusOfScotland1871Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1871; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('02 MAR 1871', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfScotland1881Test.php b/tests/app/Census/CensusOfScotland1881Test.php new file mode 100644 index 0000000000..c4838c0794 --- /dev/null +++ b/tests/app/Census/CensusOfScotland1881Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1881 + */ +class CensusOfScotland1881Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1881; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('03 MAR 1881', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfScotland1891Test.php b/tests/app/Census/CensusOfScotland1891Test.php new file mode 100644 index 0000000000..fe0df796a9 --- /dev/null +++ b/tests/app/Census/CensusOfScotland1891Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1891 + */ +class CensusOfScotland1891Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1891; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('05 MAR 1891', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfScotland1901Test.php b/tests/app/Census/CensusOfScotland1901Test.php new file mode 100644 index 0000000000..e90c5f8c19 --- /dev/null +++ b/tests/app/Census/CensusOfScotland1901Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1901 + */ +class CensusOfScotland1901Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1901; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('31 MAR 1901', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfScotland1911Test.php b/tests/app/Census/CensusOfScotland1911Test.php new file mode 100644 index 0000000000..9f414bd99f --- /dev/null +++ b/tests/app/Census/CensusOfScotland1911Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfScotland1911 + */ +class CensusOfScotland1911Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfScotland1911; + + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('02 MAR 1911', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1790Test.php b/tests/app/Census/CensusOfUnitedStates1790Test.php new file mode 100644 index 0000000000..baf01cd432 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1790Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1790 + */ +class CensusOfUnitedStates1790Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1790; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('02 AUG 1790', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1800Test.php b/tests/app/Census/CensusOfUnitedStates1800Test.php new file mode 100644 index 0000000000..99ee9db77d --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1800Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1800 + */ +class CensusOfUnitedStates1800Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1800; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('04 AUG 1800', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1810Test.php b/tests/app/Census/CensusOfUnitedStates1810Test.php new file mode 100644 index 0000000000..ce49553dbd --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1810Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1810 + */ +class CensusOfUnitedStates1810Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1810; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('06 AUG 1810', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1820Test.php b/tests/app/Census/CensusOfUnitedStates1820Test.php new file mode 100644 index 0000000000..ef6d2ce997 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1820Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1820 + */ +class CensusOfUnitedStates1820Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1820; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('07 AUG 1820', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1830Test.php b/tests/app/Census/CensusOfUnitedStates1830Test.php new file mode 100644 index 0000000000..a8ce68ed6e --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1830Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1830 + */ +class CensusOfUnitedStates1830Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1830; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1830', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1840Test.php b/tests/app/Census/CensusOfUnitedStates1840Test.php new file mode 100644 index 0000000000..0a91664210 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1840Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1840 + */ +class CensusOfUnitedStates1840Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1840; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1840', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1850Test.php b/tests/app/Census/CensusOfUnitedStates1850Test.php new file mode 100644 index 0000000000..d36d783a37 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1850Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1850 + */ +class CensusOfUnitedStates1850Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1850; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1850', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1860Test.php b/tests/app/Census/CensusOfUnitedStates1860Test.php new file mode 100644 index 0000000000..7b973136f3 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1860Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1860 + */ +class CensusOfUnitedStates1860Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1860; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('BET JUN 1860 AND OCT 1860', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1870Test.php b/tests/app/Census/CensusOfUnitedStates1870Test.php new file mode 100644 index 0000000000..332c6c4e01 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1870Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1870 + */ +class CensusOfUnitedStates1870Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1870; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('JUN 1870', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1880Test.php b/tests/app/Census/CensusOfUnitedStates1880Test.php new file mode 100644 index 0000000000..89560fe45b --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1880Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1880 + */ +class CensusOfUnitedStates1880Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1880; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('JUN 1880', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1890Test.php b/tests/app/Census/CensusOfUnitedStates1890Test.php new file mode 100644 index 0000000000..db42e13705 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1890Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1890 + */ +class CensusOfUnitedStates1890Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1890; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('02 JUN 1890', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1900Test.php b/tests/app/Census/CensusOfUnitedStates1900Test.php new file mode 100644 index 0000000000..f2f14c5cd8 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1900Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1900 + */ +class CensusOfUnitedStates1900Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1900; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1900', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1910Test.php b/tests/app/Census/CensusOfUnitedStates1910Test.php new file mode 100644 index 0000000000..c2dc9504f9 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1910Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1910 + */ +class CensusOfUnitedStates1910Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1910; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('15 APR 1910', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1920Test.php b/tests/app/Census/CensusOfUnitedStates1920Test.php new file mode 100644 index 0000000000..fd2e798274 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1920Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1920 + */ +class CensusOfUnitedStates1920Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1920; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('JAN 1920', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1930Test.php b/tests/app/Census/CensusOfUnitedStates1930Test.php new file mode 100644 index 0000000000..884317c068 --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1930Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1930 + */ +class CensusOfUnitedStates1930Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1930; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('APR 1930', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfUnitedStates1940Test.php b/tests/app/Census/CensusOfUnitedStates1940Test.php new file mode 100644 index 0000000000..41b0aca18a --- /dev/null +++ b/tests/app/Census/CensusOfUnitedStates1940Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfUnitedStates1940 + */ +class CensusOfUnitedStates1940Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfUnitedStates1940; + + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 APR 1940', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfWales1841Test.php b/tests/app/Census/CensusOfWales1841Test.php new file mode 100644 index 0000000000..4345e4fa2d --- /dev/null +++ b/tests/app/Census/CensusOfWales1841Test.php @@ -0,0 +1,49 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1841 + */ +class CensusOfWales1841Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1841; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('06 MAY 1841', $census->censusDate()); + } + + /** + * Test the census place and date + */ + public function testColumns() { + $census = new CensusOfWales1841; + $columns = $census->columns(); + + $this->assertCount(6, $columns); + $this->assertInstanceOf(CensusColumnFullName::class, $columns[0]); + $this->assertInstanceOf(CensusColumnAgeMale5Years::class, $columns[1]); + $this->assertInstanceOf(CensusColumnAgeFemale5Years::class, $columns[2]); + $this->assertInstanceOf(CensusColumnOccupation::class, $columns[3]); + $this->assertInstanceOf(CensusColumnBornSameCounty::class, $columns[4]); + $this->assertInstanceOf(CensusColumnBornForeignParts::class, $columns[5]); + } +} diff --git a/tests/app/Census/CensusOfWales1851Test.php b/tests/app/Census/CensusOfWales1851Test.php new file mode 100644 index 0000000000..4f65554e8d --- /dev/null +++ b/tests/app/Census/CensusOfWales1851Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1851 + */ +class CensusOfWales1851Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1851; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('30 MAR 1851', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfWales1861Test.php b/tests/app/Census/CensusOfWales1861Test.php new file mode 100644 index 0000000000..c5a02b1348 --- /dev/null +++ b/tests/app/Census/CensusOfWales1861Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1861 + */ +class CensusOfWales1861Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1861; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('07 MAR 1861', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfWales1871Test.php b/tests/app/Census/CensusOfWales1871Test.php new file mode 100644 index 0000000000..80f6ad81e6 --- /dev/null +++ b/tests/app/Census/CensusOfWales1871Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1871 + */ +class CensusOfWales1871Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1871; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('02 MAR 1871', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfWales1881Test.php b/tests/app/Census/CensusOfWales1881Test.php new file mode 100644 index 0000000000..515cb215b5 --- /dev/null +++ b/tests/app/Census/CensusOfWales1881Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1881 + */ +class CensusOfWales1881Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1881; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('03 MAR 1881', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfWales1891Test.php b/tests/app/Census/CensusOfWales1891Test.php new file mode 100644 index 0000000000..6e260bf9a9 --- /dev/null +++ b/tests/app/Census/CensusOfWales1891Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1891 + */ +class CensusOfWales1891Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1891; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('05 MAR 1891', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfWales1901Test.php b/tests/app/Census/CensusOfWales1901Test.php new file mode 100644 index 0000000000..76cd89550d --- /dev/null +++ b/tests/app/Census/CensusOfWales1901Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1901 + */ +class CensusOfWales1901Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1901; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('31 MAR 1901', $census->censusDate()); + } +} diff --git a/tests/app/Census/CensusOfWales1911Test.php b/tests/app/Census/CensusOfWales1911Test.php new file mode 100644 index 0000000000..f3ed211820 --- /dev/null +++ b/tests/app/Census/CensusOfWales1911Test.php @@ -0,0 +1,33 @@ +<?php + +/** + * webtrees: online genealogy + * Copyright (C) 2015 webtrees development team + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace Fisharebest\Webtrees\Census; + +/** + * Test harness for the class CensusOfWales1911 + */ +class CensusOfWales1911Test extends \PHPUnit_Framework_TestCase { + /** + * Test the census place and date + */ + public function testPlaceAndDate() { + $census = new CensusOfWales1911; + + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('02 MAR 1911', $census->censusDate()); + } +} |
