diff options
Diffstat (limited to 'tests/app/Census')
159 files changed, 10999 insertions, 10286 deletions
diff --git a/tests/app/Census/CensusColumnAgeFemale5YearsTest.php b/tests/app/Census/CensusColumnAgeFemale5YearsTest.php index 1a33fdece5..759f1584e7 100644 --- a/tests/app/Census/CensusColumnAgeFemale5YearsTest.php +++ b/tests/app/Census/CensusColumnAgeFemale5YearsTest.php @@ -22,111 +22,119 @@ use Mockery; /** * Test harness for the class CensusColumnAgeFemale5Years */ -class CensusColumnAgeFemale5YearsTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +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('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnAgeFemale5Years($census, '', ''); + $column = new CensusColumnAgeFemale5Years($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnAgeFemale5Years($census, '', ''); + $column = new CensusColumnAgeFemale5Years($census, '', ''); - $this->assertSame('30', $column->generate($individual)); - } + $this->assertSame('30', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUnknownSex() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('U'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnAgeFemale5Years($census, '', ''); + $column = new CensusColumnAgeFemale5Years($census, '', ''); - $this->assertSame('30', $column->generate($individual)); - } + $this->assertSame('30', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testLessThanOneYear() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); - $column = new CensusColumnAgeFemale5Years($census, '', ''); + $column = new CensusColumnAgeFemale5Years($census, '', ''); - $this->assertSame('0', $column->generate($individual)); - } + $this->assertSame('0', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testLessThanFifteenYears() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanFifteenYears() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1814'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1814'); - $column = new CensusColumnAgeFemale5Years($census, '', ''); + $column = new CensusColumnAgeFemale5Years($census, '', ''); - $this->assertSame('14', $column->generate($individual)); - } + $this->assertSame('14', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testRoundedDownToFiveYears() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testRoundedDownToFiveYears() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1844'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1844'); - $column = new CensusColumnAgeFemale5Years($census, '', ''); + $column = new CensusColumnAgeFemale5Years($census, '', ''); - $this->assertSame('40', $column->generate($individual)); - } + $this->assertSame('40', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnAgeFemaleTest.php b/tests/app/Census/CensusColumnAgeFemaleTest.php index 0d19b81486..9600212032 100644 --- a/tests/app/Census/CensusColumnAgeFemaleTest.php +++ b/tests/app/Census/CensusColumnAgeFemaleTest.php @@ -22,77 +22,83 @@ use Mockery; /** * Test harness for the class CensusColumnAgeFemale */ -class CensusColumnAgeFemaleTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +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('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnAgeFemale($census, '', ''); + $column = new CensusColumnAgeFemale($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnAgeFemale($census, '', ''); + $column = new CensusColumnAgeFemale($census, '', ''); - $this->assertSame('32', $column->generate($individual)); - } + $this->assertSame('32', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUnknownSex() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('U'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnAgeFemale($census, '', ''); + $column = new CensusColumnAgeFemale($census, '', ''); - $this->assertSame('32', $column->generate($individual)); - } + $this->assertSame('32', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testLessThanOneYear() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeFemale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); - $column = new CensusColumnAgeFemale($census, '', ''); + $column = new CensusColumnAgeFemale($census, '', ''); - $this->assertSame('0', $column->generate($individual)); - } + $this->assertSame('0', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnAgeMale5YearsTest.php b/tests/app/Census/CensusColumnAgeMale5YearsTest.php index e26b3ddc5a..08f7edd470 100644 --- a/tests/app/Census/CensusColumnAgeMale5YearsTest.php +++ b/tests/app/Census/CensusColumnAgeMale5YearsTest.php @@ -22,111 +22,119 @@ use Mockery; /** * Test harness for the class CensusColumnAgeMale5Years5Years */ -class CensusColumnAgeMale5YearsTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +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('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnAgeMale5Years($census, '', ''); + $column = new CensusColumnAgeMale5Years($census, '', ''); - $this->assertSame('30', $column->generate($individual)); - } + $this->assertSame('30', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnAgeMale5Years($census, '', ''); + $column = new CensusColumnAgeMale5Years($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUnknownSex() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('U'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnAgeMale5Years($census, '', ''); + $column = new CensusColumnAgeMale5Years($census, '', ''); - $this->assertSame('30', $column->generate($individual)); - } + $this->assertSame('30', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testLessThanOneYear() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); - $column = new CensusColumnAgeMale5Years($census, '', ''); + $column = new CensusColumnAgeMale5Years($census, '', ''); - $this->assertSame('0', $column->generate($individual)); - } + $this->assertSame('0', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testLessThanFifteenYears() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanFifteenYears() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1814'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1814'); - $column = new CensusColumnAgeMale5Years($census, '', ''); + $column = new CensusColumnAgeMale5Years($census, '', ''); - $this->assertSame('14', $column->generate($individual)); - } + $this->assertSame('14', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testRoundedDownToFiveYears() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testRoundedDownToFiveYears() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1844'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1844'); - $column = new CensusColumnAgeMale5Years($census, '', ''); + $column = new CensusColumnAgeMale5Years($census, '', ''); - $this->assertSame('40', $column->generate($individual)); - } + $this->assertSame('40', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnAgeMaleTest.php b/tests/app/Census/CensusColumnAgeMaleTest.php index e63619e8ad..87b3741eba 100644 --- a/tests/app/Census/CensusColumnAgeMaleTest.php +++ b/tests/app/Census/CensusColumnAgeMaleTest.php @@ -22,77 +22,83 @@ use Mockery; /** * Test harness for the class CensusColumnAgeMale */ -class CensusColumnAgeMaleTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +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('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnAgeMale($census, '', ''); + $column = new CensusColumnAgeMale($census, '', ''); - $this->assertSame('32', $column->generate($individual)); - } + $this->assertSame('32', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnAgeMale($census, '', ''); + $column = new CensusColumnAgeMale($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUnknownSex() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('U'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('U'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnAgeMale($census, '', ''); + $column = new CensusColumnAgeMale($census, '', ''); - $this->assertSame('32', $column->generate($individual)); - } + $this->assertSame('32', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testLessThanOneYear() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMale + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testLessThanOneYear() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1800'); - $column = new CensusColumnAgeMale($census, '', ''); + $column = new CensusColumnAgeMale($census, '', ''); - $this->assertSame('0', $column->generate($individual)); - } + $this->assertSame('0', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnAgeMarriedTest.php b/tests/app/Census/CensusColumnAgeMarriedTest.php index 1c96a30146..1a1d85bdf4 100644 --- a/tests/app/Census/CensusColumnAgeMarriedTest.php +++ b/tests/app/Census/CensusColumnAgeMarriedTest.php @@ -22,88 +22,94 @@ use Mockery; /** * Test harness for the class CensusColumnAgeMarried */ -class CensusColumnAgeMarriedTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnAgeMarriedTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testAgeMarried() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testAgeMarried() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('15 MAR 1840')); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('15 MAR 1840')); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnAgeMarried($census, '', ''); + $column = new CensusColumnAgeMarried($census, '', ''); - $this->assertSame(19, $column->generate($individual)); - } + $this->assertSame(19, $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoBirthDate() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('')); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoBirthDate() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('')); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnAgeMarried($census, '', ''); + $column = new CensusColumnAgeMarried($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoMarriage() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoMarriage() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('')); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('')); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnAgeMarried($census, '', ''); + $column = new CensusColumnAgeMarried($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoSpouseFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('15 MAR 1840')); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAgeMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoSpouseFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('15 MAR 1840')); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnAgeMarried($census, '', ''); + $column = new CensusColumnAgeMarried($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnAgeTest.php b/tests/app/Census/CensusColumnAgeTest.php index 82d439c8a2..c3243757ab 100644 --- a/tests/app/Census/CensusColumnAgeTest.php +++ b/tests/app/Census/CensusColumnAgeTest.php @@ -22,27 +22,30 @@ use Mockery; /** * Test harness for the class CensusColumnAge */ -class CensusColumnAgeTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnAgeTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnAge - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnAge + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('01 JAN 1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnAge($census, '', ''); + $column = new CensusColumnAge($census, '', ''); - $this->assertSame('32', $column->generate($individual)); - } + $this->assertSame('32', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthDateTest.php b/tests/app/Census/CensusColumnBirthDateTest.php index b8db1f0c93..b4c0db850c 100644 --- a/tests/app/Census/CensusColumnBirthDateTest.php +++ b/tests/app/Census/CensusColumnBirthDateTest.php @@ -21,33 +21,36 @@ use Mockery; /** * Test harness for the class CensusColumnAge */ -class CensusColumnBirthDateTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthDateTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDate - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('1 1 1800'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDate + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('1 1 1800'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthDate($census, '', ''); + $column = new CensusColumnBirthDate($census, '', ''); - $this->assertSame('1 1 1800', $column->generate($individual)); - } + $this->assertSame('1 1 1800', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthDayDotMonthYearTest.php b/tests/app/Census/CensusColumnBirthDayDotMonthYearTest.php index ef2eaee14e..ce4cdc904c 100644 --- a/tests/app/Census/CensusColumnBirthDayDotMonthYearTest.php +++ b/tests/app/Census/CensusColumnBirthDayDotMonthYearTest.php @@ -21,35 +21,38 @@ use Mockery; /** * Test harness for the class CensusColumnBirthDayDotMonthYearTest */ -class CensusColumnBirthDayDotMonthYearTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthDayDotMonthYearTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDayDotMonthYearTest - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('30. June 1832'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDayDotMonthYearTest + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('30. June 1832'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); - $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); + $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthDayDotMonthYear($census, '', ''); + $column = new CensusColumnBirthDayDotMonthYear($census, '', ''); - $this->assertSame('30. June 1832', $column->generate($individual)); - } + $this->assertSame('30. June 1832', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthDayMonthSlashYearTest.php b/tests/app/Census/CensusColumnBirthDayMonthSlashYearTest.php index 64c22a3c3c..fe65ff1207 100644 --- a/tests/app/Census/CensusColumnBirthDayMonthSlashYearTest.php +++ b/tests/app/Census/CensusColumnBirthDayMonthSlashYearTest.php @@ -21,35 +21,38 @@ use Mockery; /** * Test harness for the class CensusColumnBirthDayMonthSlashYearTest */ -class CensusColumnBirthDayMonthSlashYearTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthDayMonthSlashYearTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDayMonthSlashYearTest - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('30 Jun/1832'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDayMonthSlashYearTest + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('30 Jun/1832'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); - $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); + $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthDayMonthSlashYear($census, '', ''); + $column = new CensusColumnBirthDayMonthSlashYear($census, '', ''); - $this->assertSame('30 Jun/1832', $column->generate($individual)); - } + $this->assertSame('30 Jun/1832', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthDaySlashMonthTest.php b/tests/app/Census/CensusColumnBirthDaySlashMonthTest.php index ba56153580..4e80150e20 100644 --- a/tests/app/Census/CensusColumnBirthDaySlashMonthTest.php +++ b/tests/app/Census/CensusColumnBirthDaySlashMonthTest.php @@ -21,35 +21,38 @@ use Mockery; /** * Test harness for the class CensusColumnBirthDaySlashMonthTest */ -class CensusColumnBirthDaySlashMonthTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthDaySlashMonthTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthTest - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('30/6'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthTest + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('30/6'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); - $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); + $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthDaySlashMonth($census, '', ''); + $column = new CensusColumnBirthDaySlashMonth($census, '', ''); - $this->assertSame('30/6', $column->generate($individual)); - } + $this->assertSame('30/6', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthDaySlashMonthYearTest.php b/tests/app/Census/CensusColumnBirthDaySlashMonthYearTest.php index 5923ac45a2..947c0ddce4 100644 --- a/tests/app/Census/CensusColumnBirthDaySlashMonthYearTest.php +++ b/tests/app/Census/CensusColumnBirthDaySlashMonthYearTest.php @@ -21,35 +21,38 @@ use Mockery; /** * Test harness for the class CensusColumnBirthDaySlashMonthYearTest */ -class CensusColumnBirthDaySlashMonthYearTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthDaySlashMonthYearTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYearTest - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('30/6 1832'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYearTest + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('30/6 1832'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); - $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumJulianDay')->andReturn($cal_date); + $date->shouldReceive('maximumJulianDay')->andReturn($cal_date); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthDaySlashMonthYear($census, '', ''); + $column = new CensusColumnBirthDaySlashMonthYear($census, '', ''); - $this->assertSame('30/6 1832', $column->generate($individual)); - } + $this->assertSame('30/6 1832', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthDayTest.php b/tests/app/Census/CensusColumnBirthDayTest.php index caa5e850a6..b4ce9f64e1 100644 --- a/tests/app/Census/CensusColumnBirthDayTest.php +++ b/tests/app/Census/CensusColumnBirthDayTest.php @@ -21,33 +21,36 @@ use Mockery; /** * Test harness for the class CensusColumnAge */ -class CensusColumnBirthDayTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthDayTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDay - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('30'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthDay + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('30'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthDay($census, '', ''); + $column = new CensusColumnBirthDay($census, '', ''); - $this->assertSame('30', $column->generate($individual)); - } + $this->assertSame('30', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthMonthTest.php b/tests/app/Census/CensusColumnBirthMonthTest.php index 10d6d806d3..1c122f8b34 100644 --- a/tests/app/Census/CensusColumnBirthMonthTest.php +++ b/tests/app/Census/CensusColumnBirthMonthTest.php @@ -21,33 +21,36 @@ use Mockery; /** * Test harness for the class CensusColumnAge */ -class CensusColumnBirthMonthTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthMonthTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthMonth - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('Jan'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthMonth + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('Jan'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthMonth($census, '', ''); + $column = new CensusColumnBirthMonth($census, '', ''); - $this->assertSame('Jan', $column->generate($individual)); - } + $this->assertSame('Jan', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthPlaceSimpleTest.php b/tests/app/Census/CensusColumnBirthPlaceSimpleTest.php index 4170a62760..f6e01fa0d5 100644 --- a/tests/app/Census/CensusColumnBirthPlaceSimpleTest.php +++ b/tests/app/Census/CensusColumnBirthPlaceSimpleTest.php @@ -21,89 +21,96 @@ use Mockery; /** * Test harness for the class CensusColumnBirthPlaceSimple */ -class CensusColumnBirthPlaceSimpleTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthPlaceSimpleTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testForeignCountry() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Westminster, London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testForeignCountry() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Westminster, London, England')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('United States'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('United States'); - $column = new CensusColumnBirthPlaceSimple($census, '', ''); + $column = new CensusColumnBirthPlaceSimple($census, '', ''); - $this->assertSame('England', $column->generate($individual)); - } + $this->assertSame('England', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testJustCountry() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('United States')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testJustCountry() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('United States')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('United States'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('United States'); - $column = new CensusColumnBirthPlaceSimple($census, '', ''); + $column = new CensusColumnBirthPlaceSimple($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testKnownState() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Maryland, United States')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testKnownState() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Maryland, United States')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('United States'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('United States'); - $column = new CensusColumnBirthPlaceSimple($census, '', ''); + $column = new CensusColumnBirthPlaceSimple($census, '', ''); - $this->assertSame('Maryland', $column->generate($individual)); - } + $this->assertSame('Maryland', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testKnownStateAndTown() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Miami, Florida, United States')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testKnownStateAndTown() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Miami, Florida, United States')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('United States'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('United States'); - $column = new CensusColumnBirthPlaceSimple($census, '', ''); + $column = new CensusColumnBirthPlaceSimple($census, '', ''); - $this->assertSame('Florida', $column->generate($individual)); - } + $this->assertSame('Florida', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthPlaceTest.php b/tests/app/Census/CensusColumnBirthPlaceTest.php index ecbe48b314..c2d126d775 100644 --- a/tests/app/Census/CensusColumnBirthPlaceTest.php +++ b/tests/app/Census/CensusColumnBirthPlaceTest.php @@ -21,73 +21,79 @@ use Mockery; /** * Test harness for the class CensusColumnBirthPlace */ -class CensusColumnBirthPlaceTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthPlaceTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceCountry() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Westminster, London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceCountry() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Westminster, London, England')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBirthPlace($census, '', ''); + $column = new CensusColumnBirthPlace($census, '', ''); - $this->assertSame('Westminster, London', $column->generate($individual)); - } + $this->assertSame('Westminster, London', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceAndCountry() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceAndCountry() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('England')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBirthPlace($census, '', ''); + $column = new CensusColumnBirthPlace($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testDifferentCountry() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Paris, France')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testDifferentCountry() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Paris, France')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBirthPlace($census, '', ''); + $column = new CensusColumnBirthPlace($census, '', ''); - $this->assertSame('Paris, France', $column->generate($individual)); - } + $this->assertSame('Paris, France', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBirthYearTest.php b/tests/app/Census/CensusColumnBirthYearTest.php index 3f7f0be007..27cda0a541 100644 --- a/tests/app/Census/CensusColumnBirthYearTest.php +++ b/tests/app/Census/CensusColumnBirthYearTest.php @@ -21,33 +21,36 @@ use Mockery; /** * Test harness for the class CensusColumnAge */ -class CensusColumnBirthYearTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBirthYearTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGenerateColumn() { - $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); - $cal_date->shouldReceive('format')->andReturn('1800'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBirthYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGenerateColumn() + { + $cal_date = Mockery::mock('Fisharebest\Webtrees\Date\GregorianDate'); + $cal_date->shouldReceive('format')->andReturn('1800'); - $date = Mockery::mock('Fisharebest\Webtrees\Date'); - $date->shouldReceive('minimumDate')->andReturn($cal_date); + $date = Mockery::mock('Fisharebest\Webtrees\Date'); + $date->shouldReceive('minimumDate')->andReturn($cal_date); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn($date); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1832'); - $column = new CensusColumnBirthYear($census, '', ''); + $column = new CensusColumnBirthYear($census, '', ''); - $this->assertSame('1800', $column->generate($individual)); - } + $this->assertSame('1800', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnBornForeignPartsTest.php b/tests/app/Census/CensusColumnBornForeignPartsTest.php index 7b63021535..828d38e119 100644 --- a/tests/app/Census/CensusColumnBornForeignPartsTest.php +++ b/tests/app/Census/CensusColumnBornForeignPartsTest.php @@ -21,396 +21,422 @@ use Mockery; /** * Test harness for the class CensusColumnBornForeignParts */ -class CensusColumnBornForeignPartsTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnBornForeignPartsTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeParts = explode(', ', $place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeParts = explode(', ', $place); - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); - $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); + $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornEnglandCensusEngland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusEngland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornWalesCensusEngland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusEngland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornScotlandCensusEngland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusEngland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornIrelandCensusEngland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusEngland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('I', $column->generate($individual)); - } + $this->assertSame('I', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornForeignCensusEngland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusEngland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('F', $column->generate($individual)); - } + $this->assertSame('F', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornEnglandCensusIreland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusIreland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('E', $column->generate($individual)); - } + $this->assertSame('E', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornWalesCensusIreland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusIreland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('E', $column->generate($individual)); - } + $this->assertSame('E', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornScotlandCensusIreland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusIreland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornIrelandCensusIreland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusIreland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornForeignCensusIreland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusIreland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('F', $column->generate($individual)); - } + $this->assertSame('F', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornEnglandCensusScotland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusScotland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Scotland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('E', $column->generate($individual)); - } + $this->assertSame('E', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornWalesCensusScotland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusScotland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Scotland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('E', $column->generate($individual)); - } + $this->assertSame('E', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornScotlandCensusScotland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusScotland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Scotland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornIrelandCensusScotland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusScotland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Scotland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('I', $column->generate($individual)); - } + $this->assertSame('I', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornForeignCensusScotland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusScotland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Scotland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('F', $column->generate($individual)); - } + $this->assertSame('F', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornEnglandCensusWales() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornEnglandCensusWales() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Wales'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Wales'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornWalesCensusWales() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWalesCensusWales() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Cardiff, Wales')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Wales'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Wales'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornScotlandCensusWales() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornScotlandCensusWales() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Edinburgh, Scotland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Wales'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Wales'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornIrelandCensusWales() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornIrelandCensusWales() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Dublin, Ireland')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Wales'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Wales'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('I', $column->generate($individual)); - } + $this->assertSame('I', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornForeignCensusWales() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornForeignCensusWales() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Elbonia')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Wales'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Wales'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('F', $column->generate($individual)); - } + $this->assertSame('F', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornNowhereCensusEngland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornNowhereCensusEngland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornNowhereCensusWales() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornNowhereCensusWales() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Wales'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Wales'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornNowhereCensusScotland() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnBornForeignParts + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornNowhereCensusScotland() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Scotland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Scotland'); - $column = new CensusColumnBornForeignParts($census, '', ''); + $column = new CensusColumnBornForeignParts($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnChildrenBornAliveTest.php b/tests/app/Census/CensusColumnChildrenBornAliveTest.php index b52002e71d..373573d848 100644 --- a/tests/app/Census/CensusColumnChildrenBornAliveTest.php +++ b/tests/app/Census/CensusColumnChildrenBornAliveTest.php @@ -22,66 +22,75 @@ use Mockery; /** * Test harness for the class CensusColumnChildrenBornAlive */ -class CensusColumnChildrenBornAliveTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnChildrenBornAliveTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnChildrenBornAlive($census, '', ''); + $column = new CensusColumnChildrenBornAlive($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testCountChildren() { - // Stillborn - $child1 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child1->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); - $child1->shouldReceive('getDeathDate')->andReturn(new Date('01 FEB 1904')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testCountChildren() + { + // Stillborn + $child1 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child1->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); + $child1->shouldReceive('getDeathDate')->andReturn(new Date('01 FEB 1904')); - // Died after census - $child2 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child2->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); - $child2->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1912')); + // Died after census + $child2 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child2->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); + $child2->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1912')); - // Died before census - $child3 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child3->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); - $child3->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1910')); + // Died before census + $child3 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child3->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); + $child3->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1910')); - // Still living - $child4 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child4->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); - $child4->shouldReceive('getDeathDate')->andReturn(new Date('')); + // Still living + $child4 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child4->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); + $child4->shouldReceive('getDeathDate')->andReturn(new Date('')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getChildren')->andReturn([$child1, $child2, $child3, $child4]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getChildren')->andReturn([ + $child1, + $child2, + $child3, + $child4, + ]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 MAR 1911'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 MAR 1911'); - $column = new CensusColumnChildrenBornAlive($census, '', ''); + $column = new CensusColumnChildrenBornAlive($census, '', ''); - $this->assertSame('3', $column->generate($individual)); - } + $this->assertSame('3', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnChildrenDiedTest.php b/tests/app/Census/CensusColumnChildrenDiedTest.php index af72513c0c..0df9c15706 100644 --- a/tests/app/Census/CensusColumnChildrenDiedTest.php +++ b/tests/app/Census/CensusColumnChildrenDiedTest.php @@ -22,66 +22,75 @@ use Mockery; /** * Test harness for the class CensusColumnChildrenDied */ -class CensusColumnChildrenDiedTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnChildrenDiedTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenDied - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenDied + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnChildrenDied($census, '', ''); + $column = new CensusColumnChildrenDied($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenDied - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testCountChildren() { - // Stillborn - $child1 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child1->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); - $child1->shouldReceive('getDeathDate')->andReturn(new Date('01 FEB 1904')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenDied + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testCountChildren() + { + // Stillborn + $child1 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child1->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); + $child1->shouldReceive('getDeathDate')->andReturn(new Date('01 FEB 1904')); - // Died after census - $child2 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child2->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); - $child2->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1912')); + // Died after census + $child2 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child2->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); + $child2->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1912')); - // Died before census - $child3 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child3->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); - $child3->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1910')); + // Died before census + $child3 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child3->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); + $child3->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1910')); - // Still living - $child4 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child4->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); - $child4->shouldReceive('getDeathDate')->andReturn(new Date('')); + // Still living + $child4 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child4->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); + $child4->shouldReceive('getDeathDate')->andReturn(new Date('')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getChildren')->andReturn([$child1, $child2, $child3, $child4]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getChildren')->andReturn([ + $child1, + $child2, + $child3, + $child4, + ]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 MAR 1911'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 MAR 1911'); - $column = new CensusColumnChildrenDied($census, '', ''); + $column = new CensusColumnChildrenDied($census, '', ''); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnChildrenLivingTest.php b/tests/app/Census/CensusColumnChildrenLivingTest.php index 14b2e162f6..e2bf8a4ef2 100644 --- a/tests/app/Census/CensusColumnChildrenLivingTest.php +++ b/tests/app/Census/CensusColumnChildrenLivingTest.php @@ -22,66 +22,75 @@ use Mockery; /** * Test harness for the class CensusColumnChildrenLiving */ -class CensusColumnChildrenLivingTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnChildrenLivingTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenLiving - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenLiving + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnChildrenLiving($census, '', ''); + $column = new CensusColumnChildrenLiving($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenLiving - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testCountChildren() { - // Stillborn - $child1 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child1->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); - $child1->shouldReceive('getDeathDate')->andReturn(new Date('01 FEB 1904')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnChildrenLiving + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testCountChildren() + { + // Stillborn + $child1 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child1->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); + $child1->shouldReceive('getDeathDate')->andReturn(new Date('01 FEB 1904')); - // Died after census - $child2 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child2->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); - $child2->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1912')); + // Died after census + $child2 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child2->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); + $child2->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1912')); - // Died before census - $child3 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child3->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); - $child3->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1910')); + // Died before census + $child3 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child3->shouldReceive('getBirthDate')->andReturn(new Date('02 FEB 1904')); + $child3->shouldReceive('getDeathDate')->andReturn(new Date('20 DEC 1910')); - // Still living - $child4 = Mockery::mock('Fisharebest\Webtrees\Individual'); - $child4->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); - $child4->shouldReceive('getDeathDate')->andReturn(new Date('')); + // Still living + $child4 = Mockery::mock('Fisharebest\Webtrees\Individual'); + $child4->shouldReceive('getBirthDate')->andReturn(new Date('01 FEB 1904')); + $child4->shouldReceive('getDeathDate')->andReturn(new Date('')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getChildren')->andReturn([$child1, $child2, $child3, $child4]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getChildren')->andReturn([ + $child1, + $child2, + $child3, + $child4, + ]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 MAR 1911'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 MAR 1911'); - $column = new CensusColumnChildrenLiving($census, '', ''); + $column = new CensusColumnChildrenLiving($census, '', ''); - $this->assertSame('2', $column->generate($individual)); - } + $this->assertSame('2', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionDanishTest.php b/tests/app/Census/CensusColumnConditionDanishTest.php index efaa54c750..998d73e6a6 100644 --- a/tests/app/Census/CensusColumnConditionDanishTest.php +++ b/tests/app/Census/CensusColumnConditionDanishTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionDanish */ -class CensusColumnConditionDanishTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionDanishTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionDanish($census, '', ''); + $column = new CensusColumnConditionDanish($census, '', ''); - $this->assertSame('Ugift', $column->generate($individual)); - } + $this->assertSame('Ugift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionDanish($census, '', ''); + $column = new CensusColumnConditionDanish($census, '', ''); - $this->assertSame('Ugift', $column->generate($individual)); - } + $this->assertSame('Ugift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionDanish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionDanish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Ugift', $column->generate($individual)); - } + $this->assertSame('Ugift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionDanish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionDanish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Ugift', $column->generate($individual)); - } + $this->assertSame('Ugift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionDanish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionDanish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Gift', $column->generate($individual)); - } + $this->assertSame('Gift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionDanish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionDanish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Gift', $column->generate($individual)); - } + $this->assertSame('Gift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionDanish($census, '', ''); + $column = new CensusColumnConditionDanish($census, '', ''); - $this->assertSame('Ugift', $column->generate($individual)); - } + $this->assertSame('Ugift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionDanish($census, '', ''); + $column = new CensusColumnConditionDanish($census, '', ''); - $this->assertSame('Ugift', $column->generate($individual)); - } + $this->assertSame('Ugift', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionDanish($census, '', ''); + $column = new CensusColumnConditionDanish($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionDanish($census, '', ''); + $column = new CensusColumnConditionDanish($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionDanish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionDanish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Skilt', $column->generate($individual)); - } + $this->assertSame('Skilt', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionDanish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionDanish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Skilt', $column->generate($individual)); - } + $this->assertSame('Skilt', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionEnglishTest.php b/tests/app/Census/CensusColumnConditionEnglishTest.php index b7e197a6b1..c629932f49 100644 --- a/tests/app/Census/CensusColumnConditionEnglishTest.php +++ b/tests/app/Census/CensusColumnConditionEnglishTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionEnglish */ -class CensusColumnConditionEnglishTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionEnglishTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionEnglish($census, '', ''); + $column = new CensusColumnConditionEnglish($census, '', ''); - $this->assertSame('Unm', $column->generate($individual)); - } + $this->assertSame('Unm', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionEnglish($census, '', ''); + $column = new CensusColumnConditionEnglish($census, '', ''); - $this->assertSame('Unm', $column->generate($individual)); - } + $this->assertSame('Unm', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionEnglish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionEnglish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Unm', $column->generate($individual)); - } + $this->assertSame('Unm', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionEnglish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionEnglish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Unm', $column->generate($individual)); - } + $this->assertSame('Unm', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionEnglish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionEnglish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Wid', $column->generate($individual)); - } + $this->assertSame('Wid', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionEnglish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionEnglish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Wid', $column->generate($individual)); - } + $this->assertSame('Wid', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionEnglish($census, '', ''); + $column = new CensusColumnConditionEnglish($census, '', ''); - $this->assertSame('Unm', $column->generate($individual)); - } + $this->assertSame('Unm', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionEnglish($census, '', ''); + $column = new CensusColumnConditionEnglish($census, '', ''); - $this->assertSame('Unm', $column->generate($individual)); - } + $this->assertSame('Unm', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionEnglish($census, '', ''); + $column = new CensusColumnConditionEnglish($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionEnglish($census, '', ''); + $column = new CensusColumnConditionEnglish($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionEnglish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionEnglish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Div', $column->generate($individual)); - } + $this->assertSame('Div', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionEnglish + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionEnglish($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionEnglish($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('Div', $column->generate($individual)); - } + $this->assertSame('Div', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionFrenchFemmeTest.php b/tests/app/Census/CensusColumnConditionFrenchFemmeTest.php index c094cbc6fa..d8f4b110b2 100644 --- a/tests/app/Census/CensusColumnConditionFrenchFemmeTest.php +++ b/tests/app/Census/CensusColumnConditionFrenchFemmeTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionFrenchFemme */ -class CensusColumnConditionFrenchFemmeTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionFrenchFemmeTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFemme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFemme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionFrenchFilleTest.php b/tests/app/Census/CensusColumnConditionFrenchFilleTest.php index 71c15009a0..71dd357040 100644 --- a/tests/app/Census/CensusColumnConditionFrenchFilleTest.php +++ b/tests/app/Census/CensusColumnConditionFrenchFilleTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionFrenchFille */ -class CensusColumnConditionFrenchFilleTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionFrenchFilleTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); + $column = new CensusColumnConditionFrenchFille($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); + $column = new CensusColumnConditionFrenchFille($census, '', ''); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFille($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFille($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFille($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFille($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); + $column = new CensusColumnConditionFrenchFille($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); + $column = new CensusColumnConditionFrenchFille($census, '', ''); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); + $column = new CensusColumnConditionFrenchFille($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); + $column = new CensusColumnConditionFrenchFille($census, '', ''); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFille($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchFille($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchFille($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionFrenchGarconTest.php b/tests/app/Census/CensusColumnConditionFrenchGarconTest.php index 53da66d9f0..dd8d8a93f3 100644 --- a/tests/app/Census/CensusColumnConditionFrenchGarconTest.php +++ b/tests/app/Census/CensusColumnConditionFrenchGarconTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionFrenchGarcon */ -class CensusColumnConditionFrenchGarconTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionFrenchGarconTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchGarcon($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchGarcon($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionFrenchHommeTest.php b/tests/app/Census/CensusColumnConditionFrenchHommeTest.php index e464d584f0..701dcb9a9a 100644 --- a/tests/app/Census/CensusColumnConditionFrenchHommeTest.php +++ b/tests/app/Census/CensusColumnConditionFrenchHommeTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionFrenchHomme */ -class CensusColumnConditionFrenchHommeTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionFrenchHommeTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchHomme($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchHomme($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionFrenchVeufTest.php b/tests/app/Census/CensusColumnConditionFrenchVeufTest.php index 24844efcbc..de476bf41f 100644 --- a/tests/app/Census/CensusColumnConditionFrenchVeufTest.php +++ b/tests/app/Census/CensusColumnConditionFrenchVeufTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionFrenchVeuf */ -class CensusColumnConditionFrenchVeufTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionFrenchVeufTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuf($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuf($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionFrenchVeuveTest.php b/tests/app/Census/CensusColumnConditionFrenchVeuveTest.php index 99fa98e516..ee3ddcac3d 100644 --- a/tests/app/Census/CensusColumnConditionFrenchVeuveTest.php +++ b/tests/app/Census/CensusColumnConditionFrenchVeuveTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionFrenchVeuve */ -class CensusColumnConditionFrenchVeuveTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionFrenchVeuveTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('1', $column->generate($individual)); - } + $this->assertSame('1', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionFrenchVeuve($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionFrenchVeuve($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnConditionUsTest.php b/tests/app/Census/CensusColumnConditionUsTest.php index 968bee0ae9..6a3c56474c 100644 --- a/tests/app/Census/CensusColumnConditionUsTest.php +++ b/tests/app/Census/CensusColumnConditionUsTest.php @@ -22,283 +22,297 @@ use Mockery; /** * Test harness for the class CensusColumnConditionUs */ -class CensusColumnConditionUsTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnConditionUsTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionUs($census, '', ''); + $column = new CensusColumnConditionUs($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoSpouseFamiliesFemale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoSpouseFamiliesFemale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionUs($census, '', ''); + $column = new CensusColumnConditionUs($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('M'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionUs($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionUs($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyFactsFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyFactsFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $individual->shouldReceive('getSex')->andReturn('F'); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionUs($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionUs($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionUs($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionUs($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('W', $column->generate($individual)); - } + $this->assertSame('W', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testSpouseDeadFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testSpouseDeadFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); - $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); + $spouse = Mockery::mock('Fisharebest\Webtrees\Individual'); + $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); - $family->shouldReceive('getSpouse')->andReturn($spouse); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([]); + $family->shouldReceive('getSpouse')->andReturn($spouse); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionUs($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionUs($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('W', $column->generate($individual)); - } + $this->assertSame('W', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionUs($census, '', ''); + $column = new CensusColumnConditionUs($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testNoFamilyUnmarriedFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testNoFamilyUnmarriedFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionUs($census, '', ''); + $column = new CensusColumnConditionUs($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildMale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildMale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionUs($census, '', ''); + $column = new CensusColumnConditionUs($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testChildFemale() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testChildFemale() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $column = new CensusColumnConditionUs($census, '', ''); + $column = new CensusColumnConditionUs($census, '', ''); - $this->assertSame('S', $column->generate($individual)); - } + $this->assertSame('S', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedMale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedMale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionUs($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionUs($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('D', $column->generate($individual)); - } + $this->assertSame('D', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition - */ - public function testDivorcedFemale() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition + */ + public function testDivorcedFemale() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getMarriageDate')->andReturn(new Date('')); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnConditionUs($census, '', ''); - $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); + $column = new CensusColumnConditionUs($census, '', ''); + $census->shouldReceive('censusDate')->andReturn('30 JUN 1830'); - $this->assertSame('D', $column->generate($individual)); - } + $this->assertSame('D', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnFatherBirthPlaceSimpleTest.php b/tests/app/Census/CensusColumnFatherBirthPlaceSimpleTest.php index d343cb9299..e89a2040a7 100644 --- a/tests/app/Census/CensusColumnFatherBirthPlaceSimpleTest.php +++ b/tests/app/Census/CensusColumnFatherBirthPlaceSimpleTest.php @@ -21,50 +21,54 @@ use Mockery; /** * Test harness for the class CensusColumnFatherBirthPlaceSimple */ -class CensusColumnFatherBirthPlaceSimpleTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnFatherBirthPlaceSimpleTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeParts = explode(', ', $place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeParts = explode(', ', $place); - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); - $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); + $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testKnownStateAndTown() { - $father = Mockery::mock('Fisharebest\Webtrees\Individual'); - $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Miami, Florida, United States')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testKnownStateAndTown() + { + $father = Mockery::mock('Fisharebest\Webtrees\Individual'); + $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Miami, Florida, United States')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getHusband')->andReturn($father); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getHusband')->andReturn($father); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('United States'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('United States'); - $column = new CensusColumnFatherBirthPlaceSimple($census, '', ''); + $column = new CensusColumnFatherBirthPlaceSimple($census, '', ''); - $this->assertSame('Florida', $column->generate($individual)); - } + $this->assertSame('Florida', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnFatherBirthPlaceTest.php b/tests/app/Census/CensusColumnFatherBirthPlaceTest.php index 011c0d4158..e0a50b9037 100644 --- a/tests/app/Census/CensusColumnFatherBirthPlaceTest.php +++ b/tests/app/Census/CensusColumnFatherBirthPlaceTest.php @@ -21,107 +21,114 @@ use Mockery; /** * Test harness for the class CensusColumnFatherBirthPlace */ -class CensusColumnFatherBirthPlaceTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnFatherBirthPlaceTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeParts = explode(', ', $place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeParts = explode(', ', $place); - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); - $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); + $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testSameCountry() { - $father = Mockery::mock('Fisharebest\Webtrees\Individual'); - $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testSameCountry() + { + $father = Mockery::mock('Fisharebest\Webtrees\Individual'); + $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getHusband')->andReturn($father); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getHusband')->andReturn($father); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnFatherBirthPlace($census, '', ''); + $column = new CensusColumnFatherBirthPlace($census, '', ''); - $this->assertSame('London', $column->generate($individual)); - } + $this->assertSame('London', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testDifferentCountry() { - $father = Mockery::mock('Fisharebest\Webtrees\Individual'); - $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testDifferentCountry() + { + $father = Mockery::mock('Fisharebest\Webtrees\Individual'); + $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getHusband')->andReturn($father); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getHusband')->andReturn($father); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnFatherBirthPlace($census, '', ''); + $column = new CensusColumnFatherBirthPlace($census, '', ''); - $this->assertSame('London, England', $column->generate($individual)); - } + $this->assertSame('London, England', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParent() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getHusband')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParent() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getHusband')->andReturn(null); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnFatherBirthPlace($census, '', ''); + $column = new CensusColumnFatherBirthPlace($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParentFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParentFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnFatherBirthPlace($census, '', ''); + $column = new CensusColumnFatherBirthPlace($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnFatherForeignTest.php b/tests/app/Census/CensusColumnFatherForeignTest.php index 66b055d85a..570ff5ca10 100644 --- a/tests/app/Census/CensusColumnFatherForeignTest.php +++ b/tests/app/Census/CensusColumnFatherForeignTest.php @@ -21,104 +21,111 @@ use Mockery; /** * Test harness for the class CensusColumnFatherForeign */ -class CensusColumnFatherForeignTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnFatherForeignTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testSameCountry() { - $father = Mockery::mock('Fisharebest\Webtrees\Individual'); - $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testSameCountry() + { + $father = Mockery::mock('Fisharebest\Webtrees\Individual'); + $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getHusband')->andReturn($father); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getHusband')->andReturn($father); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnFatherForeign($census, '', ''); + $column = new CensusColumnFatherForeign($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testDifferentCountry() { - $father = Mockery::mock('Fisharebest\Webtrees\Individual'); - $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testDifferentCountry() + { + $father = Mockery::mock('Fisharebest\Webtrees\Individual'); + $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getHusband')->andReturn($father); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getHusband')->andReturn($father); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnFatherForeign($census, '', ''); + $column = new CensusColumnFatherForeign($census, '', ''); - $this->assertSame('Y', $column->generate($individual)); - } + $this->assertSame('Y', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParent() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getHusband')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParent() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getHusband')->andReturn(null); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnFatherForeign($census, '', ''); + $column = new CensusColumnFatherForeign($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParentFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFatherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParentFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnFatherForeign($census, '', ''); + $column = new CensusColumnFatherForeign($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnFullNameTest.php b/tests/app/Census/CensusColumnFullNameTest.php index ac2c3c61d5..3cb861d77e 100644 --- a/tests/app/Census/CensusColumnFullNameTest.php +++ b/tests/app/Census/CensusColumnFullNameTest.php @@ -21,28 +21,31 @@ use Mockery; /** * Test harness for the class CensusColumnFullName */ -class CensusColumnFullNameTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +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('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['full' => 'Joe Bloggs']]); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnFullName + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFullName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([['full' => 'Joe Bloggs']]); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn(''); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn(''); - $column = new CensusColumnFullName($census, '', ''); + $column = new CensusColumnFullName($census, '', ''); - $this->assertSame('Joe Bloggs', $column->generate($individual)); - } + $this->assertSame('Joe Bloggs', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnGivenNameInitialTest.php b/tests/app/Census/CensusColumnGivenNameInitialTest.php index a2d1e519fe..bd76f0466a 100644 --- a/tests/app/Census/CensusColumnGivenNameInitialTest.php +++ b/tests/app/Census/CensusColumnGivenNameInitialTest.php @@ -21,56 +21,61 @@ use Mockery; /** * Test harness for the class CensusColumnGivenNameInitial */ -class CensusColumnGivenNameInitialTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnGivenNameInitialTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testOneGivenName() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe']]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testOneGivenName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe']]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnGivenNameInitial($census, '', ''); + $column = new CensusColumnGivenNameInitial($census, '', ''); - $this->assertSame('Joe', $column->generate($individual)); - } + $this->assertSame('Joe', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMultipleGivenNames() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe Fred']]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMultipleGivenNames() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe Fred']]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnGivenNameInitial($census, '', ''); + $column = new CensusColumnGivenNameInitial($census, '', ''); - $this->assertSame('Joe F', $column->generate($individual)); - } + $this->assertSame('Joe F', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoName() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnGivenNameInitial($census, '', ''); + $column = new CensusColumnGivenNameInitial($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnGivenNamesTest.php b/tests/app/Census/CensusColumnGivenNamesTest.php index 087dc7f654..95cd829a99 100644 --- a/tests/app/Census/CensusColumnGivenNamesTest.php +++ b/tests/app/Census/CensusColumnGivenNamesTest.php @@ -21,41 +21,45 @@ use Mockery; /** * Test harness for the class CensusColumnGivenNames */ -class CensusColumnGivenNamesTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnGivenNamesTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNames - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testGivenNames() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe']]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNames + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testGivenNames() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe']]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnGivenNames($census, '', ''); + $column = new CensusColumnGivenNames($census, '', ''); - $this->assertSame('Joe', $column->generate($individual)); - } + $this->assertSame('Joe', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNames - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoName() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnGivenNames + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnGivenNames($census, '', ''); + $column = new CensusColumnGivenNames($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnMarriedWithinYearTest.php b/tests/app/Census/CensusColumnMarriedWithinYearTest.php index 2ee4e82f97..a850a7f3f1 100644 --- a/tests/app/Census/CensusColumnMarriedWithinYearTest.php +++ b/tests/app/Census/CensusColumnMarriedWithinYearTest.php @@ -22,112 +22,119 @@ use Mockery; /** * Test harness for the class CensusColumnMarriedWithinYear */ -class CensusColumnMarriedWithinYearTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnMarriedWithinYearTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriedWithinYear() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriedWithinYear() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMarriedWithinYear($census, '', ''); + $column = new CensusColumnMarriedWithinYear($census, '', ''); - $this->assertSame('Y', $column->generate($individual)); - } + $this->assertSame('Y', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriedOverYearBeforeTheCensus() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('01 JAN 1859')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriedOverYearBeforeTheCensus() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('01 JAN 1859')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMarriedWithinYear($census, '', ''); + $column = new CensusColumnMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriedAfterTheCensus() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('02 JUN 1860')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriedAfterTheCensus() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('02 JUN 1860')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMarriedWithinYear($census, '', ''); + $column = new CensusColumnMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoMarriage() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoMarriage() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMarriedWithinYear($census, '', ''); + $column = new CensusColumnMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoSpouseFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoSpouseFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMarriedWithinYear($census, '', ''); + $column = new CensusColumnMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnMonthIfBornWithinYearTest.php b/tests/app/Census/CensusColumnMonthIfBornWithinYearTest.php index 270836f0ed..98be4925bd 100644 --- a/tests/app/Census/CensusColumnMonthIfBornWithinYearTest.php +++ b/tests/app/Census/CensusColumnMonthIfBornWithinYearTest.php @@ -22,77 +22,83 @@ use Mockery; /** * Test harness for the class CensusColumnMonthIfBornWithinYear */ -class CensusColumnMonthIfBornWithinYearTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnMonthIfBornWithinYearTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornWithinYear() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('01 JAN 1860')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornWithinYear() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('01 JAN 1860')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); + $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); - $this->assertSame('Jan', $column->generate($individual)); - } + $this->assertSame('Jan', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornOverYearBeforeTheCensus() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('01 JAN 1859')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornOverYearBeforeTheCensus() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('01 JAN 1859')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); + $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBornAfterTheCensus() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('02 JUN 1860')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBornAfterTheCensus() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('02 JUN 1860')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); + $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoBirth() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthDate')->andReturn(new Date('')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoBirth() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthDate')->andReturn(new Date('')); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); + $column = new CensusColumnMonthIfBornWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php b/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php index 04f6068cda..8f2014d300 100644 --- a/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php +++ b/tests/app/Census/CensusColumnMonthIfMarriedWithinYearTest.php @@ -22,112 +22,119 @@ use Mockery; /** * Test harness for the class CensusColumnMonthIfMarriedWithinYear */ -class CensusColumnMonthIfMarriedWithinYearTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnMonthIfMarriedWithinYearTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriedWithinYear() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriedWithinYear() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('01 DEC 1859')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); + $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); - $this->assertSame('Dec', $column->generate($individual)); - } + $this->assertSame('Dec', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriedOverYearBeforeTheCensus() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('01 JAN 1859')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriedOverYearBeforeTheCensus() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('01 JAN 1859')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); + $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriedAfterTheCensus() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('02 JUN 1860')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriedAfterTheCensus() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('02 JUN 1860')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); + $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoMarriage() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoMarriage() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR')->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); + $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoSpouseFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoSpouseFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); + $column = new CensusColumnMonthIfMarriedWithinYear($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnMotherBirthPlaceSimpleTest.php b/tests/app/Census/CensusColumnMotherBirthPlaceSimpleTest.php index 05685c753f..7a646b3642 100644 --- a/tests/app/Census/CensusColumnMotherBirthPlaceSimpleTest.php +++ b/tests/app/Census/CensusColumnMotherBirthPlaceSimpleTest.php @@ -21,50 +21,54 @@ use Mockery; /** * Test harness for the class CensusColumnMotherBirthPlaceSimple */ -class CensusColumnMotherBirthPlaceSimpleTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnMotherBirthPlaceSimpleTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeParts = explode(', ', $place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeParts = explode(', ', $place); - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); - $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); + $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testKnownStateAndTown() { - $father = Mockery::mock('Fisharebest\Webtrees\Individual'); - $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Miami, Florida, United States')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testKnownStateAndTown() + { + $father = Mockery::mock('Fisharebest\Webtrees\Individual'); + $father->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Miami, Florida, United States')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getWife')->andReturn($father); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getWife')->andReturn($father); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('United States'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('United States'); - $column = new CensusColumnMotherBirthPlaceSimple($census, '', ''); + $column = new CensusColumnMotherBirthPlaceSimple($census, '', ''); - $this->assertSame('Florida', $column->generate($individual)); - } + $this->assertSame('Florida', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnMotherBirthPlaceTest.php b/tests/app/Census/CensusColumnMotherBirthPlaceTest.php index 1cc1c8e11b..3fae6e72b4 100644 --- a/tests/app/Census/CensusColumnMotherBirthPlaceTest.php +++ b/tests/app/Census/CensusColumnMotherBirthPlaceTest.php @@ -21,107 +21,114 @@ use Mockery; /** * Test harness for the class CensusColumnMotherBirthPlace */ -class CensusColumnMotherBirthPlaceTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnMotherBirthPlaceTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeParts = explode(', ', $place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeParts = explode(', ', $place); - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); - $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); + $placeMock->shouldReceive('lastPart')->andReturn(end($placeParts)); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testSameCountry() { - $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); - $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testSameCountry() + { + $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); + $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getWife')->andReturn($mother); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getWife')->andReturn($mother); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnMotherBirthPlace($census, '', ''); + $column = new CensusColumnMotherBirthPlace($census, '', ''); - $this->assertSame('London', $column->generate($individual)); - } + $this->assertSame('London', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testDifferentCountry() { - $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); - $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testDifferentCountry() + { + $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); + $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getWife')->andReturn($mother); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getWife')->andReturn($mother); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnMotherBirthPlace($census, '', ''); + $column = new CensusColumnMotherBirthPlace($census, '', ''); - $this->assertSame('London, England', $column->generate($individual)); - } + $this->assertSame('London, England', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParent() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getWife')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParent() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getWife')->andReturn(null); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnMotherBirthPlace($census, '', ''); + $column = new CensusColumnMotherBirthPlace($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParentFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlace + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParentFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnMotherBirthPlace($census, '', ''); + $column = new CensusColumnMotherBirthPlace($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnMotherForeignTest.php b/tests/app/Census/CensusColumnMotherForeignTest.php index dba46553f9..d21169b138 100644 --- a/tests/app/Census/CensusColumnMotherForeignTest.php +++ b/tests/app/Census/CensusColumnMotherForeignTest.php @@ -21,104 +21,111 @@ use Mockery; /** * Test harness for the class CensusColumnMotherForeign */ -class CensusColumnMotherForeignTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnMotherForeignTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testSameCountry() { - $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); - $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testSameCountry() + { + $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); + $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getWife')->andReturn($mother); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getWife')->andReturn($mother); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnMotherForeign($census, '', ''); + $column = new CensusColumnMotherForeign($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testDifferentCountry() { - $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); - $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testDifferentCountry() + { + $mother = Mockery::mock('Fisharebest\Webtrees\Individual'); + $mother->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getWife')->andReturn($mother); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getWife')->andReturn($mother); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Ireland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Ireland'); - $column = new CensusColumnMotherForeign($census, '', ''); + $column = new CensusColumnMotherForeign($census, '', ''); - $this->assertSame('Y', $column->generate($individual)); - } + $this->assertSame('Y', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParent() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getWife')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParent() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getWife')->andReturn(null); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn($family); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnMotherForeign($census, '', ''); + $column = new CensusColumnMotherForeign($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceNoParentFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnMotherForeign + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceNoParentFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getPrimaryChildFamily')->andReturn(null); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnMotherForeign($census, '', ''); + $column = new CensusColumnMotherForeign($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnNationalityTest.php b/tests/app/Census/CensusColumnNationalityTest.php index 39b255b244..3618079acd 100644 --- a/tests/app/Census/CensusColumnNationalityTest.php +++ b/tests/app/Census/CensusColumnNationalityTest.php @@ -22,111 +22,118 @@ use Mockery; /** * Test harness for the class CensusColumnNationality */ -class CensusColumnNationalityTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnNationalityTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * Get place mock. - * - * @param string $place Gedcom Place - * - * @return \Fisharebest\Webtrees\Place - */ - private function getPlaceMock($place) { - $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); - $placeMock->shouldReceive('getGedcomName')->andReturn($place); + /** + * Get place mock. + * + * @param string $place Gedcom Place + * + * @return \Fisharebest\Webtrees\Place + */ + private function getPlaceMock($place) + { + $placeMock = Mockery::mock('\Fisharebest\Webtrees\Place'); + $placeMock->shouldReceive('getGedcomName')->andReturn($place); - return $placeMock; - } + return $placeMock; + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoBirthPlace() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); - $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoBirthPlace() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('')); + $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('Deutschland'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('Deutschland'); - $column = new CensusColumnNationality($census, '', ''); + $column = new CensusColumnNationality($census, '', ''); - $this->assertSame('Deutsch', $column->generate($individual)); - } + $this->assertSame('Deutsch', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceCountry() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Australia')); - $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceCountry() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('Australia')); + $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnNationality($census, '', ''); + $column = new CensusColumnNationality($census, '', ''); - $this->assertSame('Australia', $column->generate($individual)); - } + $this->assertSame('Australia', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testBritish() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testBritish() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); - $column = new CensusColumnNationality($census, '', ''); + $column = new CensusColumnNationality($census, '', ''); - $this->assertSame('British', $column->generate($individual)); - } + $this->assertSame('British', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testEmigrated() { - $place1 = Mockery::mock('Fisharebest\Webtrees\Place'); - $place1->shouldReceive('getGedcomName')->andReturn('United States'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnNationality + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testEmigrated() + { + $place1 = Mockery::mock('Fisharebest\Webtrees\Place'); + $place1->shouldReceive('getGedcomName')->andReturn('United States'); - $fact1 = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact1->shouldReceive('getPlace')->andReturn($place1); - $fact1->shouldReceive('getDate')->andReturn(new Date('1855')); + $fact1 = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact1->shouldReceive('getPlace')->andReturn($place1); + $fact1->shouldReceive('getDate')->andReturn(new Date('1855')); - $place2 = Mockery::mock('Fisharebest\Webtrees\Place'); - $place2->shouldReceive('getGedcomName')->andReturn('Australia'); + $place2 = Mockery::mock('Fisharebest\Webtrees\Place'); + $place2->shouldReceive('getGedcomName')->andReturn('Australia'); - $fact2 = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact2->shouldReceive('getPlace')->andReturn($place2); - $fact2->shouldReceive('getDate')->andReturn(new Date('1865')); + $fact2 = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact2->shouldReceive('getPlace')->andReturn($place2); + $fact2->shouldReceive('getDate')->andReturn(new Date('1865')); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); - $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([ - $fact1, - $fact2, - ]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getBirthPlace')->andReturn($this->getPlaceMock('London, England')); + $individual->shouldReceive('getFacts')->with('IMMI|EMIG|NATU', true)->andReturn([ + $fact1, + $fact2, + ]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusPlace')->andReturn('England'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusPlace')->andReturn('England'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnNationality($census, '', ''); + $column = new CensusColumnNationality($census, '', ''); - $this->assertSame('United States', $column->generate($individual)); - } + $this->assertSame('United States', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnNullTest.php b/tests/app/Census/CensusColumnNullTest.php index a9c6d5eb1d..4f8682971c 100644 --- a/tests/app/Census/CensusColumnNullTest.php +++ b/tests/app/Census/CensusColumnNullTest.php @@ -21,25 +21,28 @@ use Mockery; /** * Test harness for the class CensusColumnNull */ -class CensusColumnNullTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnNullTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnNull - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNull() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnNull + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNull() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnNull($census, '', ''); + $column = new CensusColumnNull($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnOccupationTest.php b/tests/app/Census/CensusColumnOccupationTest.php index 696a0fdb78..22fb195f1b 100644 --- a/tests/app/Census/CensusColumnOccupationTest.php +++ b/tests/app/Census/CensusColumnOccupationTest.php @@ -21,44 +21,48 @@ use Mockery; /** * Test harness for the class CensusColumnOccupation */ -class CensusColumnOccupationTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +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('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getFacts')->withArgs(['OCCU'])->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnOccupation + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoOccupation() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getFacts')->withArgs(['OCCU'])->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnOccupation($census, '', ''); + $column = new CensusColumnOccupation($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnOccupation - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testOccupation() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getValue')->andReturn('Farmer'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnOccupation + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testOccupation() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getValue')->andReturn('Farmer'); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getFacts')->withArgs(['OCCU'])->andReturn([$fact]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getFacts')->withArgs(['OCCU'])->andReturn([$fact]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnOccupation($census, '', ''); + $column = new CensusColumnOccupation($census, '', ''); - $this->assertSame('Farmer', $column->generate($individual)); - } + $this->assertSame('Farmer', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnRelationToHeadGermanTest.php b/tests/app/Census/CensusColumnRelationToHeadGermanTest.php index 5f48fb2d47..31837707de 100644 --- a/tests/app/Census/CensusColumnRelationToHeadGermanTest.php +++ b/tests/app/Census/CensusColumnRelationToHeadGermanTest.php @@ -21,25 +21,28 @@ use Mockery; /** * Test harness for the class CensusColumnRelationToHead */ -class CensusColumnRelationToHeadGermanTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnRelationToHeadGermanTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnRelationToHead - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNull() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnRelationToHead + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNull() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnRelationToHeadGerman($census, '', ''); + $column = new CensusColumnRelationToHeadGerman($census, '', ''); - $this->assertSame('Haushaltungsvorstand', $column->generate($individual)); - } + $this->assertSame('Haushaltungsvorstand', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnRelationToHeadTest.php b/tests/app/Census/CensusColumnRelationToHeadTest.php index 9da5f410a0..d567fd1b45 100644 --- a/tests/app/Census/CensusColumnRelationToHeadTest.php +++ b/tests/app/Census/CensusColumnRelationToHeadTest.php @@ -21,25 +21,28 @@ use Mockery; /** * Test harness for the class CensusColumnRelationToHead */ -class CensusColumnRelationToHeadTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnRelationToHeadTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnRelationToHead - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNull() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnRelationToHead + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNull() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnRelationToHead($census, '', ''); + $column = new CensusColumnRelationToHead($census, '', ''); - $this->assertSame('head', $column->generate($individual)); - } + $this->assertSame('head', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnReligionTest.php b/tests/app/Census/CensusColumnReligionTest.php index 8d3eb4e7c7..34f022889c 100644 --- a/tests/app/Census/CensusColumnReligionTest.php +++ b/tests/app/Census/CensusColumnReligionTest.php @@ -21,26 +21,29 @@ use Mockery; /** * Test harness for the class CensusColumnReligion */ -class CensusColumnReligionTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnReligionTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnReligion - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testReligion() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnReligion + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testReligion() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnReligion($census, '', ''); + $column = new CensusColumnReligion($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnSexMFTest.php b/tests/app/Census/CensusColumnSexMFTest.php index 4ca6d1e20f..66233f087a 100644 --- a/tests/app/Census/CensusColumnSexMFTest.php +++ b/tests/app/Census/CensusColumnSexMFTest.php @@ -21,56 +21,61 @@ use Mockery; /** * Test harness for the class CensusColumnSexMF */ -class CensusColumnSexMFTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnSexMFTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMF - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMF + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMF($census, '', ''); + $column = new CensusColumnSexMF($census, '', ''); - $this->assertSame('M', $column->generate($individual)); - } + $this->assertSame('M', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMF - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testFeale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMF + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFeale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMF($census, '', ''); + $column = new CensusColumnSexMF($census, '', ''); - $this->assertSame('F', $column->generate($individual)); - } + $this->assertSame('F', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMF - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUnknownSex() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('U'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMF + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('U'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMF($census, '', ''); + $column = new CensusColumnSexMF($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnSexMKTest.php b/tests/app/Census/CensusColumnSexMKTest.php index 2f016be412..50b257591f 100644 --- a/tests/app/Census/CensusColumnSexMKTest.php +++ b/tests/app/Census/CensusColumnSexMKTest.php @@ -21,56 +21,61 @@ use Mockery; /** * Test harness for the class CensusColumnSexMK */ -class CensusColumnSexMKTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnSexMKTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMK($census, '', ''); + $column = new CensusColumnSexMK($census, '', ''); - $this->assertSame('M', $column->generate($individual)); - } + $this->assertSame('M', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testFeale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFeale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMK($census, '', ''); + $column = new CensusColumnSexMK($census, '', ''); - $this->assertSame('K', $column->generate($individual)); - } + $this->assertSame('K', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUnknownSex() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('U'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMK + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('U'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMK($census, '', ''); + $column = new CensusColumnSexMK($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnSexMZTest.php b/tests/app/Census/CensusColumnSexMZTest.php index e865e7883f..d0839ec31e 100644 --- a/tests/app/Census/CensusColumnSexMZTest.php +++ b/tests/app/Census/CensusColumnSexMZTest.php @@ -21,56 +21,61 @@ use Mockery; /** * Test harness for the class CensusColumnSexMZ */ -class CensusColumnSexMZTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnSexMZTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMZ - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('M'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMZ + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('M'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMZ($census, '', ''); + $column = new CensusColumnSexMZ($census, '', ''); - $this->assertSame('M', $column->generate($individual)); - } + $this->assertSame('M', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMZ - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testFeale() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('F'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMZ + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testFeale() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('F'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMZ($census, '', ''); + $column = new CensusColumnSexMZ($census, '', ''); - $this->assertSame('Ž', $column->generate($individual)); - } + $this->assertSame('Ž', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMZ - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUnknownSex() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSex')->andReturn('U'); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSexMZ + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUnknownSex() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSex')->andReturn('U'); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSexMZ($census, '', ''); + $column = new CensusColumnSexMZ($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnSurnameGivenNameInitialTest.php b/tests/app/Census/CensusColumnSurnameGivenNameInitialTest.php index e22787db6d..505d27e835 100644 --- a/tests/app/Census/CensusColumnSurnameGivenNameInitialTest.php +++ b/tests/app/Census/CensusColumnSurnameGivenNameInitialTest.php @@ -21,45 +21,59 @@ use Mockery; /** * Test harness for the class CensusColumnSurnameGivenNameInitial */ -class CensusColumnSurnameGivenNameInitialTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnSurnameGivenNameInitialTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testOneGivenName() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe', 'surn' => 'Sixpack']]); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testOneGivenName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([ + [ + 'givn' => 'Joe', + 'surn' => 'Sixpack', + ], + ]); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn(''); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn(''); - $column = new CensusColumnSurnameGivenNameInitial($census, '', ''); + $column = new CensusColumnSurnameGivenNameInitial($census, '', ''); - $this->assertSame('Sixpack, Joe', $column->generate($individual)); - } + $this->assertSame('Sixpack, Joe', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMultipleGivenNames() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe Fred', 'surn' => 'Sixpack']]); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMultipleGivenNames() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([ + [ + 'givn' => 'Joe Fred', + 'surn' => 'Sixpack', + ], + ]); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn(''); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn(''); - $column = new CensusColumnSurnameGivenNameInitial($census, '', ''); + $column = new CensusColumnSurnameGivenNameInitial($census, '', ''); - $this->assertSame('Sixpack, Joe F', $column->generate($individual)); - } + $this->assertSame('Sixpack, Joe F', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnSurnameGivenNamesTest.php b/tests/app/Census/CensusColumnSurnameGivenNamesTest.php index 3f9289d840..61ae47a7ae 100644 --- a/tests/app/Census/CensusColumnSurnameGivenNamesTest.php +++ b/tests/app/Census/CensusColumnSurnameGivenNamesTest.php @@ -21,62 +21,77 @@ use Mockery; /** * Test harness for the class CensusColumnSurnameGivenNames */ -class CensusColumnSurnameGivenNamesTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnSurnameGivenNamesTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testOneGivenName() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe', 'surn' => 'Sixpack']]); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testOneGivenName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([ + [ + 'givn' => 'Joe', + 'surn' => 'Sixpack', + ], + ]); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn(''); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn(''); - $column = new CensusColumnSurnameGivenNames($census, '', ''); + $column = new CensusColumnSurnameGivenNames($census, '', ''); - $this->assertSame('Sixpack, Joe', $column->generate($individual)); - } + $this->assertSame('Sixpack, Joe', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMultipleGivenNames() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['givn' => 'Joe Fred', 'surn' => 'Sixpack']]); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMultipleGivenNames() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([ + [ + 'givn' => 'Joe Fred', + 'surn' => 'Sixpack', + ], + ]); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn(''); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn(''); - $column = new CensusColumnSurnameGivenNames($census, '', ''); + $column = new CensusColumnSurnameGivenNames($census, '', ''); - $this->assertSame('Sixpack, Joe Fred', $column->generate($individual)); - } + $this->assertSame('Sixpack, Joe Fred', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoName() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([]); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([]); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn(''); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn(''); - $column = new CensusColumnSurnameGivenNames($census, '', ''); + $column = new CensusColumnSurnameGivenNames($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnSurnameTest.php b/tests/app/Census/CensusColumnSurnameTest.php index f41ae87d85..27fed2df04 100644 --- a/tests/app/Census/CensusColumnSurnameTest.php +++ b/tests/app/Census/CensusColumnSurnameTest.php @@ -21,41 +21,45 @@ use Mockery; /** * Test harness for the class CensusColumnSurname */ -class CensusColumnSurnameTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnSurnameTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSurname - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testSurname() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([['surname' => 'Bloggs']]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSurname + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testSurname() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([['surname' => 'Bloggs']]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSurname($census, '', ''); + $column = new CensusColumnSurname($census, '', ''); - $this->assertSame('Bloggs', $column->generate($individual)); - } + $this->assertSame('Bloggs', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnSurname - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoName() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getAllNames')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnSurname + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoName() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getAllNames')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $column = new CensusColumnSurname($census, '', ''); + $column = new CensusColumnSurname($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusColumnYearsMarriedTest.php b/tests/app/Census/CensusColumnYearsMarriedTest.php index d7eb413c0f..2d86fa8134 100644 --- a/tests/app/Census/CensusColumnYearsMarriedTest.php +++ b/tests/app/Census/CensusColumnYearsMarriedTest.php @@ -22,112 +22,119 @@ use Mockery; /** * Test harness for the class CensusColumnYearsMarried */ -class CensusColumnYearsMarriedTest extends \PHPUnit\Framework\TestCase { - /** - * Delete mock objects - */ - public function tearDown() { - Mockery::close(); - } +class CensusColumnYearsMarriedTest extends \PHPUnit\Framework\TestCase +{ + /** + * Delete mock objects + */ + public function tearDown() + { + Mockery::close(); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoSpouseFamily() { - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoSpouseFamily() + { + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnYearsMarried($census, '', ''); + $column = new CensusColumnYearsMarried($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testNoMarriage() { - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([]); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testNoMarriage() + { + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnYearsMarried($census, '', ''); + $column = new CensusColumnYearsMarried($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testUndatedMarriage() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testUndatedMarriage() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnYearsMarried($census, '', ''); + $column = new CensusColumnYearsMarried($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriageAfterCensus() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('1861')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriageAfterCensus() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('1861')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnYearsMarried($census, '', ''); + $column = new CensusColumnYearsMarried($census, '', ''); - $this->assertSame('', $column->generate($individual)); - } + $this->assertSame('', $column->generate($individual)); + } - /** - * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testMarriageBeforeCensus() { - $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); - $fact->shouldReceive('getDate')->andReturn(new Date('OCT 1851')); + /** + * @covers \Fisharebest\Webtrees\Census\CensusColumnYearsMarried + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testMarriageBeforeCensus() + { + $fact = Mockery::mock('Fisharebest\Webtrees\Fact'); + $fact->shouldReceive('getDate')->andReturn(new Date('OCT 1851')); - $family = Mockery::mock('Fisharebest\Webtrees\Family'); - $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); + $family = Mockery::mock('Fisharebest\Webtrees\Family'); + $family->shouldReceive('getFacts')->with('MARR', true)->andReturn([$fact]); - $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); - $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); + $individual = Mockery::mock('Fisharebest\Webtrees\Individual'); + $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]); - $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); - $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); + $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface'); + $census->shouldReceive('censusDate')->andReturn('01 JUN 1860'); - $column = new CensusColumnYearsMarried($census, '', ''); + $column = new CensusColumnYearsMarried($census, '', ''); - $this->assertSame('8', $column->generate($individual)); - } + $this->assertSame('8', $column->generate($individual)); + } } diff --git a/tests/app/Census/CensusOfCzechRepublic1880Test.php b/tests/app/Census/CensusOfCzechRepublic1880Test.php index f499ed15cc..d105841480 100644 --- a/tests/app/Census/CensusOfCzechRepublic1880Test.php +++ b/tests/app/Census/CensusOfCzechRepublic1880Test.php @@ -19,70 +19,73 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfCzechRepublic1880 */ -class CensusOfCzechRepublic1880Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880 - */ - public function testPlaceAndDate() { - $census = new CensusOfCzechRepublic1880; +class CensusOfCzechRepublic1880Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880 + */ + public function testPlaceAndDate() + { + $census = new CensusOfCzechRepublic1880; - $this->assertSame('Česko', $census->censusPlace()); - $this->assertSame('31 DEC 1880', $census->censusDate()); - } + $this->assertSame('Česko', $census->censusPlace()); + $this->assertSame('31 DEC 1880', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfCzechRepublic1880; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfCzechRepublic1880; + $columns = $census->columns(); - $this->assertCount(13, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertCount(13, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertSame('Jméno', $columns[0]->abbreviation()); - $this->assertSame('Vztah', $columns[1]->abbreviation()); - $this->assertSame('Pohlaví', $columns[2]->abbreviation()); - $this->assertSame('Narození', $columns[3]->abbreviation()); - $this->assertSame('Rodiště', $columns[4]->abbreviation()); - $this->assertSame('Přísluší', $columns[5]->abbreviation()); - $this->assertSame('Vyznání', $columns[6]->abbreviation()); - $this->assertSame('Stav', $columns[7]->abbreviation()); - $this->assertSame('Jazyk', $columns[8]->abbreviation()); - $this->assertSame('Povolání', $columns[9]->abbreviation()); - $this->assertSame('Postavení', $columns[10]->abbreviation()); - $this->assertSame('Gramotnost', $columns[11]->abbreviation()); - $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); + $this->assertSame('Jméno', $columns[0]->abbreviation()); + $this->assertSame('Vztah', $columns[1]->abbreviation()); + $this->assertSame('Pohlaví', $columns[2]->abbreviation()); + $this->assertSame('Narození', $columns[3]->abbreviation()); + $this->assertSame('Rodiště', $columns[4]->abbreviation()); + $this->assertSame('Přísluší', $columns[5]->abbreviation()); + $this->assertSame('Vyznání', $columns[6]->abbreviation()); + $this->assertSame('Stav', $columns[7]->abbreviation()); + $this->assertSame('Jazyk', $columns[8]->abbreviation()); + $this->assertSame('Povolání', $columns[9]->abbreviation()); + $this->assertSame('Postavení', $columns[10]->abbreviation()); + $this->assertSame('Gramotnost', $columns[11]->abbreviation()); + $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('Datum narození', $columns[3]->title()); - $this->assertSame('Místo narození', $columns[4]->title()); - $this->assertSame('Domovské právo', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Rodinný stav', $columns[7]->title()); - $this->assertSame('Jazyk v obcování', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); - $this->assertSame('Znalost čtení a psaní', $columns[11]->title()); - $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('Datum narození', $columns[3]->title()); + $this->assertSame('Místo narození', $columns[4]->title()); + $this->assertSame('Domovské právo', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Rodinný stav', $columns[7]->title()); + $this->assertSame('Jazyk v obcování', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); + $this->assertSame('Znalost čtení a psaní', $columns[11]->title()); + $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); + } } diff --git a/tests/app/Census/CensusOfCzechRepublic1890Test.php b/tests/app/Census/CensusOfCzechRepublic1890Test.php index 80d4d074db..98fd40b0b8 100644 --- a/tests/app/Census/CensusOfCzechRepublic1890Test.php +++ b/tests/app/Census/CensusOfCzechRepublic1890Test.php @@ -19,70 +19,73 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfCzechRepublic1890 */ -class CensusOfCzechRepublic1890Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890 - */ - public function testPlaceAndDate() { - $census = new CensusOfCzechRepublic1890; +class CensusOfCzechRepublic1890Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890 + */ + public function testPlaceAndDate() + { + $census = new CensusOfCzechRepublic1890; - $this->assertSame('Česko', $census->censusPlace()); - $this->assertSame('31 DEC 1890', $census->censusDate()); - } + $this->assertSame('Česko', $census->censusPlace()); + $this->assertSame('31 DEC 1890', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfCzechRepublic1890; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfCzechRepublic1890; + $columns = $census->columns(); - $this->assertCount(13, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertCount(13, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertSame('Jméno', $columns[0]->abbreviation()); - $this->assertSame('Vztah', $columns[1]->abbreviation()); - $this->assertSame('Pohlaví', $columns[2]->abbreviation()); - $this->assertSame('Narození', $columns[3]->abbreviation()); - $this->assertSame('Rodiště', $columns[4]->abbreviation()); - $this->assertSame('Přísluší', $columns[5]->abbreviation()); - $this->assertSame('Vyznání', $columns[6]->abbreviation()); - $this->assertSame('Stav', $columns[7]->abbreviation()); - $this->assertSame('Jazyk', $columns[8]->abbreviation()); - $this->assertSame('Povolání', $columns[9]->abbreviation()); - $this->assertSame('Postavení', $columns[10]->abbreviation()); - $this->assertSame('Gramotnost', $columns[11]->abbreviation()); - $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); + $this->assertSame('Jméno', $columns[0]->abbreviation()); + $this->assertSame('Vztah', $columns[1]->abbreviation()); + $this->assertSame('Pohlaví', $columns[2]->abbreviation()); + $this->assertSame('Narození', $columns[3]->abbreviation()); + $this->assertSame('Rodiště', $columns[4]->abbreviation()); + $this->assertSame('Přísluší', $columns[5]->abbreviation()); + $this->assertSame('Vyznání', $columns[6]->abbreviation()); + $this->assertSame('Stav', $columns[7]->abbreviation()); + $this->assertSame('Jazyk', $columns[8]->abbreviation()); + $this->assertSame('Povolání', $columns[9]->abbreviation()); + $this->assertSame('Postavení', $columns[10]->abbreviation()); + $this->assertSame('Gramotnost', $columns[11]->abbreviation()); + $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('Datum narození', $columns[3]->title()); - $this->assertSame('Místo narození', $columns[4]->title()); - $this->assertSame('Domovské právo', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Rodinný stav', $columns[7]->title()); - $this->assertSame('Jazyk v obcování', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); - $this->assertSame('Znalost čtení a psaní', $columns[11]->title()); - $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('Datum narození', $columns[3]->title()); + $this->assertSame('Místo narození', $columns[4]->title()); + $this->assertSame('Domovské právo', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Rodinný stav', $columns[7]->title()); + $this->assertSame('Jazyk v obcování', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); + $this->assertSame('Znalost čtení a psaní', $columns[11]->title()); + $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); + } } diff --git a/tests/app/Census/CensusOfCzechRepublic1900Test.php b/tests/app/Census/CensusOfCzechRepublic1900Test.php index bf1f1adb96..25b61644ae 100644 --- a/tests/app/Census/CensusOfCzechRepublic1900Test.php +++ b/tests/app/Census/CensusOfCzechRepublic1900Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfCzechRepublic1900 */ -class CensusOfCzechRepublic1900Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900 - */ - public function testPlaceAndDate() { - $census = new CensusOfCzechRepublic1900; +class CensusOfCzechRepublic1900Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900 + */ + public function testPlaceAndDate() + { + $census = new CensusOfCzechRepublic1900; - $this->assertSame('Česko', $census->censusPlace()); - $this->assertSame('31 DEC 1900', $census->censusDate()); - } + $this->assertSame('Česko', $census->censusPlace()); + $this->assertSame('31 DEC 1900', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfCzechRepublic1900; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfCzechRepublic1900; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Jméno', $columns[0]->abbreviation()); - $this->assertSame('Vztah', $columns[1]->abbreviation()); - $this->assertSame('Pohlaví', $columns[2]->abbreviation()); - $this->assertSame('Narození', $columns[3]->abbreviation()); - $this->assertSame('Rodiště', $columns[4]->abbreviation()); - $this->assertSame('Přísluší', $columns[5]->abbreviation()); - $this->assertSame('Vyznání', $columns[6]->abbreviation()); - $this->assertSame('Stav', $columns[7]->abbreviation()); - $this->assertSame('Jazyk', $columns[8]->abbreviation()); - $this->assertSame('Povolání', $columns[9]->abbreviation()); - $this->assertSame('Postavení', $columns[10]->abbreviation()); - $this->assertSame('Gramotnost', $columns[11]->abbreviation()); - $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); - $this->assertSame('Od roku', $columns[13]->abbreviation()); + $this->assertSame('Jméno', $columns[0]->abbreviation()); + $this->assertSame('Vztah', $columns[1]->abbreviation()); + $this->assertSame('Pohlaví', $columns[2]->abbreviation()); + $this->assertSame('Narození', $columns[3]->abbreviation()); + $this->assertSame('Rodiště', $columns[4]->abbreviation()); + $this->assertSame('Přísluší', $columns[5]->abbreviation()); + $this->assertSame('Vyznání', $columns[6]->abbreviation()); + $this->assertSame('Stav', $columns[7]->abbreviation()); + $this->assertSame('Jazyk', $columns[8]->abbreviation()); + $this->assertSame('Povolání', $columns[9]->abbreviation()); + $this->assertSame('Postavení', $columns[10]->abbreviation()); + $this->assertSame('Gramotnost', $columns[11]->abbreviation()); + $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); + $this->assertSame('Od roku', $columns[13]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('Datum narození', $columns[3]->title()); - $this->assertSame('Místo narození', $columns[4]->title()); - $this->assertSame('Domovské právo', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Rodinný stav', $columns[7]->title()); - $this->assertSame('Jazyk v obcování', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); - $this->assertSame('Znalost čtení a psaní', $columns[11]->title()); - $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); - $this->assertSame('Počátek pobytu', $columns[13]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('Datum narození', $columns[3]->title()); + $this->assertSame('Místo narození', $columns[4]->title()); + $this->assertSame('Domovské právo', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Rodinný stav', $columns[7]->title()); + $this->assertSame('Jazyk v obcování', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('Postavení v zaměstnání', $columns[10]->title()); + $this->assertSame('Znalost čtení a psaní', $columns[11]->title()); + $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); + $this->assertSame('Počátek pobytu', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfCzechRepublic1910Test.php b/tests/app/Census/CensusOfCzechRepublic1910Test.php index bc36acfebb..bec526fdf6 100644 --- a/tests/app/Census/CensusOfCzechRepublic1910Test.php +++ b/tests/app/Census/CensusOfCzechRepublic1910Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfCzechRepublic1910 */ -class CensusOfCzechRepublic1910Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910 - */ - public function testPlaceAndDate() { - $census = new CensusOfCzechRepublic1910; +class CensusOfCzechRepublic1910Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910 + */ + public function testPlaceAndDate() + { + $census = new CensusOfCzechRepublic1910; - $this->assertSame('Česko', $census->censusPlace()); - $this->assertSame('31 DEC 1910', $census->censusDate()); - } + $this->assertSame('Česko', $census->censusPlace()); + $this->assertSame('31 DEC 1910', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfCzechRepublic1910; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfCzechRepublic1910; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Jméno', $columns[0]->abbreviation()); - $this->assertSame('Vztah', $columns[1]->abbreviation()); - $this->assertSame('Pohlaví', $columns[2]->abbreviation()); - $this->assertSame('Narození', $columns[3]->abbreviation()); - $this->assertSame('Rodiště', $columns[4]->abbreviation()); - $this->assertSame('Přísluší', $columns[5]->abbreviation()); - $this->assertSame('Vyznání', $columns[6]->abbreviation()); - $this->assertSame('Stav', $columns[7]->abbreviation()); - $this->assertSame('Jazyk', $columns[8]->abbreviation()); - $this->assertSame('Gramotnost', $columns[9]->abbreviation()); - $this->assertSame('Povolání', $columns[10]->abbreviation()); - $this->assertSame('Postavení', $columns[11]->abbreviation()); - $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); - $this->assertSame('Od roku', $columns[13]->abbreviation()); + $this->assertSame('Jméno', $columns[0]->abbreviation()); + $this->assertSame('Vztah', $columns[1]->abbreviation()); + $this->assertSame('Pohlaví', $columns[2]->abbreviation()); + $this->assertSame('Narození', $columns[3]->abbreviation()); + $this->assertSame('Rodiště', $columns[4]->abbreviation()); + $this->assertSame('Přísluší', $columns[5]->abbreviation()); + $this->assertSame('Vyznání', $columns[6]->abbreviation()); + $this->assertSame('Stav', $columns[7]->abbreviation()); + $this->assertSame('Jazyk', $columns[8]->abbreviation()); + $this->assertSame('Gramotnost', $columns[9]->abbreviation()); + $this->assertSame('Povolání', $columns[10]->abbreviation()); + $this->assertSame('Postavení', $columns[11]->abbreviation()); + $this->assertSame('Druh pobytu', $columns[12]->abbreviation()); + $this->assertSame('Od roku', $columns[13]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('Datum narození', $columns[3]->title()); - $this->assertSame('Místo narození', $columns[4]->title()); - $this->assertSame('Domovské právo', $columns[5]->title()); - $this->assertSame('Vyznání náoženské', $columns[6]->title()); - $this->assertSame('Rodinný stav', $columns[7]->title()); - $this->assertSame('Řeč obcovací', $columns[8]->title()); - $this->assertSame('Znalost čtení a psaní', $columns[9]->title()); - $this->assertSame('Obor povolání', $columns[10]->title()); - $this->assertSame('Postavení v zaměstnání', $columns[11]->title()); - $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); - $this->assertSame('Počátek pobytu', $columns[13]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('Datum narození', $columns[3]->title()); + $this->assertSame('Místo narození', $columns[4]->title()); + $this->assertSame('Domovské právo', $columns[5]->title()); + $this->assertSame('Vyznání náoženské', $columns[6]->title()); + $this->assertSame('Rodinný stav', $columns[7]->title()); + $this->assertSame('Řeč obcovací', $columns[8]->title()); + $this->assertSame('Znalost čtení a psaní', $columns[9]->title()); + $this->assertSame('Obor povolání', $columns[10]->title()); + $this->assertSame('Postavení v zaměstnání', $columns[11]->title()); + $this->assertSame('Pobyt dočasný nebo trvalý', $columns[12]->title()); + $this->assertSame('Počátek pobytu', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfCzechRepublic1921Test.php b/tests/app/Census/CensusOfCzechRepublic1921Test.php index 088acceb03..05d1bad83d 100644 --- a/tests/app/Census/CensusOfCzechRepublic1921Test.php +++ b/tests/app/Census/CensusOfCzechRepublic1921Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfCzechRepublic1921 */ -class CensusOfCzechRepublic1921Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921 - */ - public function testPlaceAndDate() { - $census = new CensusOfCzechRepublic1921; +class CensusOfCzechRepublic1921Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921 + */ + public function testPlaceAndDate() + { + $census = new CensusOfCzechRepublic1921; - $this->assertSame('Česko', $census->censusPlace()); - $this->assertSame('15 FEB 1921', $census->censusDate()); - } + $this->assertSame('Česko', $census->censusPlace()); + $this->assertSame('15 FEB 1921', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfCzechRepublic1921; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfCzechRepublic1921; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMZ', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Jméno', $columns[0]->abbreviation()); - $this->assertSame('Vztah', $columns[1]->abbreviation()); - $this->assertSame('Pohlaví', $columns[2]->abbreviation()); - $this->assertSame('Stav', $columns[3]->abbreviation()); - $this->assertSame('Narození', $columns[4]->abbreviation()); - $this->assertSame('Místo', $columns[5]->abbreviation()); - $this->assertSame('Přísluší', $columns[6]->abbreviation()); - $this->assertSame('Národnost', $columns[7]->abbreviation()); - $this->assertSame('Vyznání', $columns[8]->abbreviation()); - $this->assertSame('Gramotnost', $columns[9]->abbreviation()); - $this->assertSame('Povolání', $columns[10]->abbreviation()); - $this->assertSame('Postavení', $columns[11]->abbreviation()); - $this->assertSame('Podnik', $columns[12]->abbreviation()); - $this->assertSame('', $columns[13]->abbreviation()); + $this->assertSame('Jméno', $columns[0]->abbreviation()); + $this->assertSame('Vztah', $columns[1]->abbreviation()); + $this->assertSame('Pohlaví', $columns[2]->abbreviation()); + $this->assertSame('Stav', $columns[3]->abbreviation()); + $this->assertSame('Narození', $columns[4]->abbreviation()); + $this->assertSame('Místo', $columns[5]->abbreviation()); + $this->assertSame('Přísluší', $columns[6]->abbreviation()); + $this->assertSame('Národnost', $columns[7]->abbreviation()); + $this->assertSame('Vyznání', $columns[8]->abbreviation()); + $this->assertSame('Gramotnost', $columns[9]->abbreviation()); + $this->assertSame('Povolání', $columns[10]->abbreviation()); + $this->assertSame('Postavení', $columns[11]->abbreviation()); + $this->assertSame('Podnik', $columns[12]->abbreviation()); + $this->assertSame('', $columns[13]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('Rodinný stav', $columns[3]->title()); - $this->assertSame('Datum narození', $columns[4]->title()); - $this->assertSame('Místo narození', $columns[5]->title()); - $this->assertSame('Domovské právo', $columns[6]->title()); - $this->assertSame('Mateřský jazyk', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('Znalost čtení a psaní', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('Postavení v zaměstnání', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - $this->assertSame('', $columns[13]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('Rodinný stav', $columns[3]->title()); + $this->assertSame('Datum narození', $columns[4]->title()); + $this->assertSame('Místo narození', $columns[5]->title()); + $this->assertSame('Domovské právo', $columns[6]->title()); + $this->assertSame('Mateřský jazyk', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('Znalost čtení a psaní', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('Postavení v zaměstnání', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + $this->assertSame('', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfCzechRepublicTest.php b/tests/app/Census/CensusOfCzechRepublicTest.php index 7cc11c753f..c584e27a37 100644 --- a/tests/app/Census/CensusOfCzechRepublicTest.php +++ b/tests/app/Census/CensusOfCzechRepublicTest.php @@ -19,33 +19,36 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfCzechRepublic */ -class CensusOfCzechRepublicTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic - */ - public function testPlace() { - $census = new CensusOfCzechRepublic; +class CensusOfCzechRepublicTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic + */ + public function testPlace() + { + $census = new CensusOfCzechRepublic; - $this->assertSame('Česko', $census->censusPlace()); - } + $this->assertSame('Česko', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic - */ - public function testAllDates() { - $census = new CensusOfCzechRepublic; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfCzechRepublic + */ + public function testAllDates() + { + $census = new CensusOfCzechRepublic; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(5, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921', $census_dates[4]); - } + $this->assertCount(5, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1880', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1890', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1900', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1910', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic1921', $census_dates[4]); + } } diff --git a/tests/app/Census/CensusOfDenmark1787Test.php b/tests/app/Census/CensusOfDenmark1787Test.php index 16e0a5c7a9..2b362dcf01 100644 --- a/tests/app/Census/CensusOfDenmark1787Test.php +++ b/tests/app/Census/CensusOfDenmark1787Test.php @@ -19,46 +19,49 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1787 */ -class CensusOfDenmark1787Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1787 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1787; +class CensusOfDenmark1787Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1787 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1787; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 JUL 1787', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 JUL 1787', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1787 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1787; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1787 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1787; + $columns = $census->columns(); - $this->assertCount(5, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertCount(5, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[1]->abbreviation()); - $this->assertSame('Alder', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Erhverv', $columns[4]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[1]->abbreviation()); + $this->assertSame('Alder', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Erhverv', $columns[4]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1801Test.php b/tests/app/Census/CensusOfDenmark1801Test.php index 0cfde7e5db..0feb128cae 100644 --- a/tests/app/Census/CensusOfDenmark1801Test.php +++ b/tests/app/Census/CensusOfDenmark1801Test.php @@ -19,46 +19,49 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1801 */ -class CensusOfDenmark1801Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1801 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1801; +class CensusOfDenmark1801Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1801 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1801; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1801', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1801', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1801 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1801; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1801 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1801; + $columns = $census->columns(); - $this->assertCount(5, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertCount(5, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[1]->abbreviation()); - $this->assertSame('Alder', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Erhverv', $columns[4]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[1]->abbreviation()); + $this->assertSame('Alder', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Erhverv', $columns[4]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1803Test.php b/tests/app/Census/CensusOfDenmark1803Test.php index 94d56b948d..a958c2dbb4 100644 --- a/tests/app/Census/CensusOfDenmark1803Test.php +++ b/tests/app/Census/CensusOfDenmark1803Test.php @@ -19,46 +19,49 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1803 */ -class CensusOfDenmark1803Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1803 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1803; +class CensusOfDenmark1803Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1803 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1803; - $this->assertSame('Schleswig-Holstein, Deutschland', $census->censusPlace()); - $this->assertSame('01 FEB 1803', $census->censusDate()); - } + $this->assertSame('Schleswig-Holstein, Deutschland', $census->censusPlace()); + $this->assertSame('01 FEB 1803', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1803 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1803; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1803 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1803; + $columns = $census->columns(); - $this->assertCount(5, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertCount(5, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[1]->abbreviation()); - $this->assertSame('Alder', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Erhverv', $columns[4]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[1]->abbreviation()); + $this->assertSame('Alder', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Erhverv', $columns[4]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1834Test.php b/tests/app/Census/CensusOfDenmark1834Test.php index b586b849db..e2c8c8bb7c 100644 --- a/tests/app/Census/CensusOfDenmark1834Test.php +++ b/tests/app/Census/CensusOfDenmark1834Test.php @@ -19,43 +19,46 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1834 */ -class CensusOfDenmark1834Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1834 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1834; +class CensusOfDenmark1834Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1834 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1834; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('18 FEB 1834', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('18 FEB 1834', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1834 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1834; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1834 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1834; + $columns = $census->columns(); - $this->assertCount(4, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); + $this->assertCount(4, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Alder', $columns[1]->abbreviation()); - $this->assertSame('Civilstand', $columns[2]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[3]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Alder', $columns[1]->abbreviation()); + $this->assertSame('Civilstand', $columns[2]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[3]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1835Test.php b/tests/app/Census/CensusOfDenmark1835Test.php index 9e5e3f1823..6fc8eac19f 100644 --- a/tests/app/Census/CensusOfDenmark1835Test.php +++ b/tests/app/Census/CensusOfDenmark1835Test.php @@ -19,43 +19,46 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1835 */ -class CensusOfDenmark1835Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1835 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1835; +class CensusOfDenmark1835Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1835 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1835; - $this->assertSame('Schleswig-Holstein, Deutschland', $census->censusPlace()); - $this->assertSame('18 FEB 1835', $census->censusDate()); - } + $this->assertSame('Schleswig-Holstein, Deutschland', $census->censusPlace()); + $this->assertSame('18 FEB 1835', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1835 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1835; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1835 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1835; + $columns = $census->columns(); - $this->assertCount(4, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); + $this->assertCount(4, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Alder', $columns[1]->abbreviation()); - $this->assertSame('Civilstand', $columns[2]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[3]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Alder', $columns[1]->abbreviation()); + $this->assertSame('Civilstand', $columns[2]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[3]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1840Test.php b/tests/app/Census/CensusOfDenmark1840Test.php index bd66df6480..db872a7e4e 100644 --- a/tests/app/Census/CensusOfDenmark1840Test.php +++ b/tests/app/Census/CensusOfDenmark1840Test.php @@ -19,43 +19,46 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1840 */ -class CensusOfDenmark1840Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1840 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1840; +class CensusOfDenmark1840Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1840 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1840; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1840', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1840', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1840 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1840; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1840 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1840; + $columns = $census->columns(); - $this->assertCount(4, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); + $this->assertCount(4, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Alder', $columns[1]->abbreviation()); - $this->assertSame('Civilstand', $columns[2]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[3]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Alder', $columns[1]->abbreviation()); + $this->assertSame('Civilstand', $columns[2]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[3]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1845Test.php b/tests/app/Census/CensusOfDenmark1845Test.php index e03049f2ea..4fc6958f37 100644 --- a/tests/app/Census/CensusOfDenmark1845Test.php +++ b/tests/app/Census/CensusOfDenmark1845Test.php @@ -19,52 +19,55 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1845 */ -class CensusOfDenmark1845Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1845 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1845; +class CensusOfDenmark1845Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1845 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1845; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1845', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1845', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1845 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1845; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1845 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1845; + $columns = $census->columns(); - $this->assertCount(7, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertCount(7, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Alder', $columns[1]->abbreviation()); - $this->assertSame('Civilstand', $columns[2]->abbreviation()); - $this->assertSame('Erhverv', $columns[3]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); - $this->assertSame('', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Alder', $columns[1]->abbreviation()); + $this->assertSame('Civilstand', $columns[2]->abbreviation()); + $this->assertSame('Erhverv', $columns[3]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); + $this->assertSame('', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1850Test.php b/tests/app/Census/CensusOfDenmark1850Test.php index 61c8090c7f..ddabf585c9 100644 --- a/tests/app/Census/CensusOfDenmark1850Test.php +++ b/tests/app/Census/CensusOfDenmark1850Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1850 */ -class CensusOfDenmark1850Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1850 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1850; +class CensusOfDenmark1850Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1850 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1850; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1850', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1850', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1850 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1850; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1850 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1850; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Alder', $columns[1]->abbreviation()); - $this->assertSame('Civilstand', $columns[2]->abbreviation()); - $this->assertSame('Erhverv', $columns[3]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); - $this->assertSame('', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('', $columns[8]->abbreviation()); - $this->assertSame('', $columns[9]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Alder', $columns[1]->abbreviation()); + $this->assertSame('Civilstand', $columns[2]->abbreviation()); + $this->assertSame('Erhverv', $columns[3]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); + $this->assertSame('', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('', $columns[8]->abbreviation()); + $this->assertSame('', $columns[9]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1855Test.php b/tests/app/Census/CensusOfDenmark1855Test.php index 641feffe47..684584b33f 100644 --- a/tests/app/Census/CensusOfDenmark1855Test.php +++ b/tests/app/Census/CensusOfDenmark1855Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1855 */ -class CensusOfDenmark1855Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1855 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1855; +class CensusOfDenmark1855Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1855 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1855; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1855', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1855', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1855 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1855; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1855 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1855; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Alder', $columns[1]->abbreviation()); - $this->assertSame('Civilstand', $columns[2]->abbreviation()); - $this->assertSame('Erhverv', $columns[3]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); - $this->assertSame('', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('', $columns[8]->abbreviation()); - $this->assertSame('', $columns[9]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Alder', $columns[1]->abbreviation()); + $this->assertSame('Civilstand', $columns[2]->abbreviation()); + $this->assertSame('Erhverv', $columns[3]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); + $this->assertSame('', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('', $columns[8]->abbreviation()); + $this->assertSame('', $columns[9]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1860Test.php b/tests/app/Census/CensusOfDenmark1860Test.php index 608d870672..2707cffa03 100644 --- a/tests/app/Census/CensusOfDenmark1860Test.php +++ b/tests/app/Census/CensusOfDenmark1860Test.php @@ -19,67 +19,70 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1860 */ -class CensusOfDenmark1860Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1860 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1860; +class CensusOfDenmark1860Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1860 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1860; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1860', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1860', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1860 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1860; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1860 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1860; + $columns = $census->columns(); - $this->assertCount(12, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertCount(12, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Alder', $columns[1]->abbreviation()); - $this->assertSame('Civilstand', $columns[2]->abbreviation()); - $this->assertSame('Erhverv', $columns[3]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); - $this->assertSame('', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('', $columns[8]->abbreviation()); - $this->assertSame('', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Alder', $columns[1]->abbreviation()); + $this->assertSame('Civilstand', $columns[2]->abbreviation()); + $this->assertSame('Erhverv', $columns[3]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[4]->abbreviation()); + $this->assertSame('', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('', $columns[8]->abbreviation()); + $this->assertSame('', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1870Test.php b/tests/app/Census/CensusOfDenmark1870Test.php index 8e481cb2f2..1286c53850 100644 --- a/tests/app/Census/CensusOfDenmark1870Test.php +++ b/tests/app/Census/CensusOfDenmark1870Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1870 */ -class CensusOfDenmark1870Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1870 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1870; +class CensusOfDenmark1870Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1870 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1870; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1870', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1870', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1870 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1870; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1870 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1870; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Alder', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Religion', $columns[4]->abbreviation()); - $this->assertSame('Erhverv', $columns[5]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('', $columns[8]->abbreviation()); - $this->assertSame('', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[12]->abbreviation()); - $this->assertSame('', $columns[13]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Alder', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Religion', $columns[4]->abbreviation()); + $this->assertSame('Erhverv', $columns[5]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('', $columns[8]->abbreviation()); + $this->assertSame('', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('', $columns[12]->abbreviation()); + $this->assertSame('', $columns[13]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - $this->assertSame('', $columns[13]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + $this->assertSame('', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1880Test.php b/tests/app/Census/CensusOfDenmark1880Test.php index 95eee69cb7..487caed513 100644 --- a/tests/app/Census/CensusOfDenmark1880Test.php +++ b/tests/app/Census/CensusOfDenmark1880Test.php @@ -19,70 +19,73 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1880 */ -class CensusOfDenmark1880Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1880 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1880; +class CensusOfDenmark1880Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1880 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1880; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1880', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1880', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1880 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1880; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1880 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1880; + $columns = $census->columns(); - $this->assertCount(13, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertCount(13, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Alder', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Religion', $columns[4]->abbreviation()); - $this->assertSame('Erhverv', $columns[5]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('', $columns[8]->abbreviation()); - $this->assertSame('', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[12]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Alder', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Religion', $columns[4]->abbreviation()); + $this->assertSame('Erhverv', $columns[5]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('', $columns[8]->abbreviation()); + $this->assertSame('', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('', $columns[12]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1885Test.php b/tests/app/Census/CensusOfDenmark1885Test.php index efb3de25a8..3bf3462023 100644 --- a/tests/app/Census/CensusOfDenmark1885Test.php +++ b/tests/app/Census/CensusOfDenmark1885Test.php @@ -19,70 +19,73 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1885 */ -class CensusOfDenmark1885Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1885 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1885; +class CensusOfDenmark1885Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1885 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1885; - $this->assertSame('København, Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1885', $census->censusDate()); - } + $this->assertSame('København, Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1885', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1885 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1885; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1885 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1885; + $columns = $census->columns(); - $this->assertCount(13, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertCount(13, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Alder', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Religion', $columns[4]->abbreviation()); - $this->assertSame('Erhverv', $columns[5]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('', $columns[8]->abbreviation()); - $this->assertSame('', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[12]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Alder', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Religion', $columns[4]->abbreviation()); + $this->assertSame('Erhverv', $columns[5]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('', $columns[8]->abbreviation()); + $this->assertSame('', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('', $columns[12]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1890Test.php b/tests/app/Census/CensusOfDenmark1890Test.php index 539c1b530f..516a38649a 100644 --- a/tests/app/Census/CensusOfDenmark1890Test.php +++ b/tests/app/Census/CensusOfDenmark1890Test.php @@ -19,76 +19,79 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1890 */ -class CensusOfDenmark1890Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1890 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1890; +class CensusOfDenmark1890Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1890 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1890; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1890', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1890', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1890 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1890; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1890 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1890; + $columns = $census->columns(); - $this->assertCount(15, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertCount(15, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Alder', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Trossamfund', $columns[4]->abbreviation()); - $this->assertSame('Fødested', $columns[5]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); - $this->assertSame('Erhverv', $columns[7]->abbreviation()); - $this->assertSame('Erhvervsstedet', $columns[8]->abbreviation()); - $this->assertSame('Døvstumme', $columns[9]->abbreviation()); - $this->assertSame('Døve', $columns[10]->abbreviation()); - $this->assertSame('Blinde', $columns[11]->abbreviation()); - $this->assertSame('Idioter', $columns[12]->abbreviation()); - $this->assertSame('Sindssyge', $columns[13]->abbreviation()); - $this->assertSame('Anmærkninger', $columns[14]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Alder', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Trossamfund', $columns[4]->abbreviation()); + $this->assertSame('Fødested', $columns[5]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[6]->abbreviation()); + $this->assertSame('Erhverv', $columns[7]->abbreviation()); + $this->assertSame('Erhvervsstedet', $columns[8]->abbreviation()); + $this->assertSame('Døvstumme', $columns[9]->abbreviation()); + $this->assertSame('Døve', $columns[10]->abbreviation()); + $this->assertSame('Blinde', $columns[11]->abbreviation()); + $this->assertSame('Idioter', $columns[12]->abbreviation()); + $this->assertSame('Sindssyge', $columns[13]->abbreviation()); + $this->assertSame('Anmærkninger', $columns[14]->abbreviation()); - $this->assertSame('Samtlige Personers fulde Navn.', $columns[0]->title()); - $this->assertSame('Kjønnet. Mandkøn (M.) eller Kvindekøn (Kv.).', $columns[1]->title()); - $this->assertSame('Alder. Alderen anføres med det fyldte Aar, men for Børn, der ikke have fyldt 1 Aar, anføres „Under 1 Aar“ of Fødselsdagen.', $columns[2]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U.), Gift (G.), Enkemand eller Enke (E.), Separeret (S.), Fraskilt (F.).', $columns[3]->title()); - $this->assertSame('Trossamfund („Folkekirken“ eller andetSamfund, saasom „det frilutheranske“, „det romersk katholske“, det „mosaiske“ o.s.v.).', $columns[4]->title()); - $this->assertSame('Fødested, nemlig Sognets og Amtets eller Kjøbstadens (eller Handelpladsens) Navn, og for de i Bilandene Fødte samt for Udlændinge Landet, hvori de ere fødte.', $columns[5]->title()); - $this->assertSame('Stilling i Familien (Husfader, Husmoder, Barn, Tjenestetyende, Logerende o.s.v.).', $columns[6]->title()); - $this->assertSame('Erhverv (Embede, Forretning, Næringsvej og Titel, samt Vedkommendes Stilling som Hovedperson eller Medhjælper, Forvalter, Svend eller Dreng o.s.v.). - Arten af Erhvervet (Gaardejer, Husmand, Grovsmed, Vognfabrikant, Høker o.s.v.). - Under Fattigforsørgelse.', $columns[7]->title()); - $this->assertSame('Erhvervsstedet (Beboelseskommunen eller hvilken anden Kommune).', $columns[8]->title()); - $this->assertSame('Døvstumme.', $columns[9]->title()); - $this->assertSame('Døve (Hørelson aldeles berøvet).', $columns[10]->title()); - $this->assertSame('Blinde (Synet aldeles borsvet).', $columns[11]->title()); - $this->assertSame('Uden Forstandsovner (Idioter).', $columns[12]->title()); - $this->assertSame('Sindssyge.', $columns[13]->title()); - $this->assertSame('Anmærkninger.', $columns[14]->title()); - } + $this->assertSame('Samtlige Personers fulde Navn.', $columns[0]->title()); + $this->assertSame('Kjønnet. Mandkøn (M.) eller Kvindekøn (Kv.).', $columns[1]->title()); + $this->assertSame('Alder. Alderen anføres med det fyldte Aar, men for Børn, der ikke have fyldt 1 Aar, anføres „Under 1 Aar“ of Fødselsdagen.', $columns[2]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U.), Gift (G.), Enkemand eller Enke (E.), Separeret (S.), Fraskilt (F.).', $columns[3]->title()); + $this->assertSame('Trossamfund („Folkekirken“ eller andetSamfund, saasom „det frilutheranske“, „det romersk katholske“, det „mosaiske“ o.s.v.).', $columns[4]->title()); + $this->assertSame('Fødested, nemlig Sognets og Amtets eller Kjøbstadens (eller Handelpladsens) Navn, og for de i Bilandene Fødte samt for Udlændinge Landet, hvori de ere fødte.', $columns[5]->title()); + $this->assertSame('Stilling i Familien (Husfader, Husmoder, Barn, Tjenestetyende, Logerende o.s.v.).', $columns[6]->title()); + $this->assertSame('Erhverv (Embede, Forretning, Næringsvej og Titel, samt Vedkommendes Stilling som Hovedperson eller Medhjælper, Forvalter, Svend eller Dreng o.s.v.). - Arten af Erhvervet (Gaardejer, Husmand, Grovsmed, Vognfabrikant, Høker o.s.v.). - Under Fattigforsørgelse.', $columns[7]->title()); + $this->assertSame('Erhvervsstedet (Beboelseskommunen eller hvilken anden Kommune).', $columns[8]->title()); + $this->assertSame('Døvstumme.', $columns[9]->title()); + $this->assertSame('Døve (Hørelson aldeles berøvet).', $columns[10]->title()); + $this->assertSame('Blinde (Synet aldeles borsvet).', $columns[11]->title()); + $this->assertSame('Uden Forstandsovner (Idioter).', $columns[12]->title()); + $this->assertSame('Sindssyge.', $columns[13]->title()); + $this->assertSame('Anmærkninger.', $columns[14]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1901Test.php b/tests/app/Census/CensusOfDenmark1901Test.php index 810177c66f..a3a004d2d9 100644 --- a/tests/app/Census/CensusOfDenmark1901Test.php +++ b/tests/app/Census/CensusOfDenmark1901Test.php @@ -19,82 +19,85 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1901 */ -class CensusOfDenmark1901Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1901 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1901; +class CensusOfDenmark1901Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1901 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1901; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1901', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1901', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1901 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1901; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1901 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1901; + $columns = $census->columns(); - $this->assertCount(17, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertCount(17, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Trossamfund', $columns[4]->abbreviation()); - $this->assertSame('Fødested', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); - $this->assertSame('Erhverv', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[12]->abbreviation()); - $this->assertSame('', $columns[13]->abbreviation()); - $this->assertSame('', $columns[14]->abbreviation()); - $this->assertSame('', $columns[15]->abbreviation()); - $this->assertSame('Anmærkninger', $columns[16]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Trossamfund', $columns[4]->abbreviation()); + $this->assertSame('Fødested', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); + $this->assertSame('Erhverv', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('', $columns[12]->abbreviation()); + $this->assertSame('', $columns[13]->abbreviation()); + $this->assertSame('', $columns[14]->abbreviation()); + $this->assertSame('', $columns[15]->abbreviation()); + $this->assertSame('Anmærkninger', $columns[16]->abbreviation()); - $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“.', $columns[0]->title()); - $this->assertSame('Kjønnet. Mandkøn (M.) eller Kvindekøn (Kv.).', $columns[1]->title()); - $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U.), Gift (G.), Enkemand eller Enke (E.), Separeret (S.), Fraskilt (F.).', $columns[3]->title()); - $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „uden for Trossamfund“).', $columns[4]->title()); - $this->assertSame('Fødested 1) Indenlandsk Fødested: Kebstadens, Handelspladsens eller Sogneta og Amtets Navn (kan Amtet ikke angives, sættes vedkommende Landsdel, f. Eks. Fyn, Jlland osv.), 2) Fedt i Bilandene eller Udlandet: Landets Navn.', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('Stilling i Familien (Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende (naar vedkommende har Skudsmaalsbog), Pensioner, logerende.', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - $this->assertSame('', $columns[13]->title()); - $this->assertSame('', $columns[14]->title()); - $this->assertSame('', $columns[15]->title()); - $this->assertSame('Anmærkninger.', $columns[16]->title()); - } + $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“.', $columns[0]->title()); + $this->assertSame('Kjønnet. Mandkøn (M.) eller Kvindekøn (Kv.).', $columns[1]->title()); + $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U.), Gift (G.), Enkemand eller Enke (E.), Separeret (S.), Fraskilt (F.).', $columns[3]->title()); + $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „uden for Trossamfund“).', $columns[4]->title()); + $this->assertSame('Fødested 1) Indenlandsk Fødested: Kebstadens, Handelspladsens eller Sogneta og Amtets Navn (kan Amtet ikke angives, sættes vedkommende Landsdel, f. Eks. Fyn, Jlland osv.), 2) Fedt i Bilandene eller Udlandet: Landets Navn.', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('Stilling i Familien (Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende (naar vedkommende har Skudsmaalsbog), Pensioner, logerende.', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + $this->assertSame('', $columns[13]->title()); + $this->assertSame('', $columns[14]->title()); + $this->assertSame('', $columns[15]->title()); + $this->assertSame('Anmærkninger.', $columns[16]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1906Test.php b/tests/app/Census/CensusOfDenmark1906Test.php index 66d3110614..930f376227 100644 --- a/tests/app/Census/CensusOfDenmark1906Test.php +++ b/tests/app/Census/CensusOfDenmark1906Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1906 */ -class CensusOfDenmark1906Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1906 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1906; +class CensusOfDenmark1906Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1906 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1906; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1906', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1906', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1906 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1906; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1906 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1906; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Trossamfund', $columns[4]->abbreviation()); - $this->assertSame('Fødested', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); - $this->assertSame('Erhverv', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[12]->abbreviation()); - $this->assertSame('Anmærkninger', $columns[13]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Trossamfund', $columns[4]->abbreviation()); + $this->assertSame('Fødested', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); + $this->assertSame('Erhverv', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('', $columns[12]->abbreviation()); + $this->assertSame('Anmærkninger', $columns[13]->abbreviation()); - $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); - $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); - $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[3]->title()); - $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - $this->assertSame('Anmærkninger.', $columns[13]->title()); - } + $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); + $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); + $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[3]->title()); + $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + $this->assertSame('Anmærkninger.', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1911Test.php b/tests/app/Census/CensusOfDenmark1911Test.php index 0716f56bfa..7195e79bcd 100644 --- a/tests/app/Census/CensusOfDenmark1911Test.php +++ b/tests/app/Census/CensusOfDenmark1911Test.php @@ -19,76 +19,79 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1911 */ -class CensusOfDenmark1911Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1911 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1911; +class CensusOfDenmark1911Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1911 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1911; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1911', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1911', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1911 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1911; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1911 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1911; + $columns = $census->columns(); - $this->assertCount(15, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertCount(15, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Trossamfund', $columns[4]->abbreviation()); - $this->assertSame('Fødested', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); - $this->assertSame('Erhverv', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[12]->abbreviation()); - $this->assertSame('', $columns[13]->abbreviation()); - $this->assertSame('Anmærkninger', $columns[14]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Trossamfund', $columns[4]->abbreviation()); + $this->assertSame('Fødested', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); + $this->assertSame('Erhverv', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('', $columns[12]->abbreviation()); + $this->assertSame('', $columns[13]->abbreviation()); + $this->assertSame('Anmærkninger', $columns[14]->abbreviation()); - $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); - $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); - $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[3]->title()); - $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - $this->assertSame('', $columns[13]->title()); - $this->assertSame('Anmærkninger.', $columns[14]->title()); - } + $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); + $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); + $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[3]->title()); + $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + $this->assertSame('', $columns[13]->title()); + $this->assertSame('Anmærkninger.', $columns[14]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1916Test.php b/tests/app/Census/CensusOfDenmark1916Test.php index c6b79d9fa5..96f3cd46e8 100644 --- a/tests/app/Census/CensusOfDenmark1916Test.php +++ b/tests/app/Census/CensusOfDenmark1916Test.php @@ -19,67 +19,70 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1916 */ -class CensusOfDenmark1916Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1916 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1916; +class CensusOfDenmark1916Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1916 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1916; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1916', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1916', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1916 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1916; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1916 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1916; + $columns = $census->columns(); - $this->assertCount(12, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertCount(12, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); - $this->assertSame('Civilstand', $columns[3]->abbreviation()); - $this->assertSame('Trossamfund', $columns[4]->abbreviation()); - $this->assertSame('Fødested', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); - $this->assertSame('Erhverv', $columns[9]->abbreviation()); - $this->assertSame('', $columns[10]->abbreviation()); - $this->assertSame('Anmærkninger', $columns[11]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); + $this->assertSame('Civilstand', $columns[3]->abbreviation()); + $this->assertSame('Trossamfund', $columns[4]->abbreviation()); + $this->assertSame('Fødested', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[8]->abbreviation()); + $this->assertSame('Erhverv', $columns[9]->abbreviation()); + $this->assertSame('', $columns[10]->abbreviation()); + $this->assertSame('Anmærkninger', $columns[11]->abbreviation()); - $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); - $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); - $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[3]->title()); - $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('Anmærkninger.', $columns[11]->title()); - } + $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); + $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); + $this->assertSame('Føderlsaar og Føderladag.', $columns[2]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[3]->title()); + $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('Anmærkninger.', $columns[11]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1921Test.php b/tests/app/Census/CensusOfDenmark1921Test.php index 74af6a8c86..15bf1731ab 100644 --- a/tests/app/Census/CensusOfDenmark1921Test.php +++ b/tests/app/Census/CensusOfDenmark1921Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1921 */ -class CensusOfDenmark1921Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1921 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1921; +class CensusOfDenmark1921Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1921 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1921; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('01 FEB 1921', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('01 FEB 1921', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1921 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1921; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1921 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1921; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); - $this->assertSame('Fødselsaar', $columns[3]->abbreviation()); - $this->assertSame('Civilstand', $columns[4]->abbreviation()); - $this->assertSame('Fødested', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('', $columns[7]->abbreviation()); - $this->assertSame('Trossamfund', $columns[8]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[9]->abbreviation()); - $this->assertSame('Erhverv', $columns[10]->abbreviation()); - $this->assertSame('', $columns[11]->abbreviation()); - $this->assertSame('', $columns[12]->abbreviation()); - $this->assertSame('Anmærkninger', $columns[13]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); + $this->assertSame('Fødselsaar', $columns[3]->abbreviation()); + $this->assertSame('Civilstand', $columns[4]->abbreviation()); + $this->assertSame('Fødested', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('', $columns[7]->abbreviation()); + $this->assertSame('Trossamfund', $columns[8]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[9]->abbreviation()); + $this->assertSame('Erhverv', $columns[10]->abbreviation()); + $this->assertSame('', $columns[11]->abbreviation()); + $this->assertSame('', $columns[12]->abbreviation()); + $this->assertSame('Anmærkninger', $columns[13]->abbreviation()); - $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); - $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[8]->title()); - $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - $this->assertSame('Anmærkninger.', $columns[13]->title()); - } + $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); + $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('Trossamfund (Folkekirken eller Navnet paa det Trossamfund, man tilhører, eller „udenfor Trossamfund“).', $columns[8]->title()); + $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + $this->assertSame('Anmærkninger.', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1925Test.php b/tests/app/Census/CensusOfDenmark1925Test.php index fa97ab0e40..2ef302f53e 100644 --- a/tests/app/Census/CensusOfDenmark1925Test.php +++ b/tests/app/Census/CensusOfDenmark1925Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1925 */ -class CensusOfDenmark1925Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1925 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1925; +class CensusOfDenmark1925Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1925 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1925; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('05 NOV 1925', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('05 NOV 1925', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1925 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1925; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1925 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1925; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Køn', $columns[1]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); - $this->assertSame('Fødselsaar', $columns[3]->abbreviation()); - $this->assertSame('Fødested', $columns[4]->abbreviation()); - $this->assertSame('Statsbergerferhold', $columns[5]->abbreviation()); - $this->assertSame('Civilstand', $columns[6]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[7]->abbreviation()); - $this->assertSame('Erhverv', $columns[8]->abbreviation()); - $this->assertSame('Bopæl', $columns[9]->abbreviation()); - $this->assertSame('Anmærkninger', $columns[10]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Køn', $columns[1]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[2]->abbreviation()); + $this->assertSame('Fødselsaar', $columns[3]->abbreviation()); + $this->assertSame('Fødested', $columns[4]->abbreviation()); + $this->assertSame('Statsbergerferhold', $columns[5]->abbreviation()); + $this->assertSame('Civilstand', $columns[6]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[7]->abbreviation()); + $this->assertSame('Erhverv', $columns[8]->abbreviation()); + $this->assertSame('Bopæl', $columns[9]->abbreviation()); + $this->assertSame('Anmærkninger', $columns[10]->abbreviation()); - $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); - $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[6]->title()); - $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[7]->title()); - $this->assertSame('Erhverv eller Livsstilling', $columns[8]->title()); - $this->assertSame('Bopæl den 5. Novbr. 1924', $columns[9]->title()); - $this->assertSame('Anmærkninger', $columns[10]->title()); - } + $this->assertSame('Samtlige Personers Navn (ogsaa Fornavn). Ved Børn, endnu uden Navn, sættes „Dreng“ eller „Pige“. Midlertidig fraværerade Personer anføres ikke her, men paa Skemaeta Bagside)', $columns[0]->title()); + $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[6]->title()); + $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[7]->title()); + $this->assertSame('Erhverv eller Livsstilling', $columns[8]->title()); + $this->assertSame('Bopæl den 5. Novbr. 1924', $columns[9]->title()); + $this->assertSame('Anmærkninger', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1930Test.php b/tests/app/Census/CensusOfDenmark1930Test.php index 6c74080bda..eb6cf1d588 100644 --- a/tests/app/Census/CensusOfDenmark1930Test.php +++ b/tests/app/Census/CensusOfDenmark1930Test.php @@ -19,85 +19,88 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1930 */ -class CensusOfDenmark1930Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1930 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1930; +class CensusOfDenmark1930Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1930 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1930; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('05 NOV 1930', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('05 NOV 1930', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1930 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1930; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1930 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1930; + $columns = $census->columns(); - $this->assertCount(18, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertCount(18, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Bopæl', $columns[1]->abbreviation()); - $this->assertSame('Andetsteds', $columns[2]->abbreviation()); - $this->assertSame('Stede', $columns[3]->abbreviation()); - $this->assertSame('Bopæl', $columns[4]->abbreviation()); - $this->assertSame('Køn', $columns[5]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[6]->abbreviation()); - $this->assertSame('Fødselsaar', $columns[7]->abbreviation()); - $this->assertSame('Fødested', $columns[8]->abbreviation()); - $this->assertSame('Statsbergerferhold', $columns[9]->abbreviation()); - $this->assertSame('Civilstand', $columns[10]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[11]->abbreviation()); - $this->assertSame('Erhverv', $columns[12]->abbreviation()); - $this->assertSame('', $columns[13]->abbreviation()); - $this->assertSame('', $columns[14]->abbreviation()); - $this->assertSame('', $columns[15]->abbreviation()); - $this->assertSame('', $columns[16]->abbreviation()); - $this->assertSame('', $columns[17]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Bopæl', $columns[1]->abbreviation()); + $this->assertSame('Andetsteds', $columns[2]->abbreviation()); + $this->assertSame('Stede', $columns[3]->abbreviation()); + $this->assertSame('Bopæl', $columns[4]->abbreviation()); + $this->assertSame('Køn', $columns[5]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[6]->abbreviation()); + $this->assertSame('Fødselsaar', $columns[7]->abbreviation()); + $this->assertSame('Fødested', $columns[8]->abbreviation()); + $this->assertSame('Statsbergerferhold', $columns[9]->abbreviation()); + $this->assertSame('Civilstand', $columns[10]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[11]->abbreviation()); + $this->assertSame('Erhverv', $columns[12]->abbreviation()); + $this->assertSame('', $columns[13]->abbreviation()); + $this->assertSame('', $columns[14]->abbreviation()); + $this->assertSame('', $columns[15]->abbreviation()); + $this->assertSame('', $columns[16]->abbreviation()); + $this->assertSame('', $columns[17]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Hvis den i Rubrik 3 opførte Person har fast Bopæl andetsteds, anføres her den faste Bopæl', $columns[2]->title()); - $this->assertSame('Hvis den i Rubrik 3 opførte Person paa Tællingsdagen til Stede paa Tællingsstedet? Ja eller Nej.', $columns[3]->title()); - $this->assertSame('Bopæl den 5. Novbr. 1929', $columns[4]->title()); - $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[10]->title()); - $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[11]->title()); - $this->assertSame('', $columns[12]->title()); - $this->assertSame('', $columns[13]->title()); - $this->assertSame('', $columns[14]->title()); - $this->assertSame('', $columns[15]->title()); - $this->assertSame('', $columns[16]->title()); - $this->assertSame('', $columns[17]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Hvis den i Rubrik 3 opførte Person har fast Bopæl andetsteds, anføres her den faste Bopæl', $columns[2]->title()); + $this->assertSame('Hvis den i Rubrik 3 opførte Person paa Tællingsdagen til Stede paa Tællingsstedet? Ja eller Nej.', $columns[3]->title()); + $this->assertSame('Bopæl den 5. Novbr. 1929', $columns[4]->title()); + $this->assertSame('Kjønnet. Mandkøn (M) eller Kvindekøn (K).', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[10]->title()); + $this->assertSame('Stilling i Familien: Husfader, Husmoder, Barn, Slangtning o.l., Tjenestetyende, Logerende, Pensioner', $columns[11]->title()); + $this->assertSame('', $columns[12]->title()); + $this->assertSame('', $columns[13]->title()); + $this->assertSame('', $columns[14]->title()); + $this->assertSame('', $columns[15]->title()); + $this->assertSame('', $columns[16]->title()); + $this->assertSame('', $columns[17]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmark1940Test.php b/tests/app/Census/CensusOfDenmark1940Test.php index f9cea2ce69..4b03eae216 100644 --- a/tests/app/Census/CensusOfDenmark1940Test.php +++ b/tests/app/Census/CensusOfDenmark1940Test.php @@ -19,76 +19,79 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark1930 */ -class CensusOfDenmark1940Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1940 - */ - public function testPlaceAndDate() { - $census = new CensusOfDenmark1940; +class CensusOfDenmark1940Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1940 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDenmark1940; - $this->assertSame('Danmark', $census->censusPlace()); - $this->assertSame('05 NOV 1940', $census->censusDate()); - } + $this->assertSame('Danmark', $census->censusPlace()); + $this->assertSame('05 NOV 1940', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1940 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDenmark1940; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark1940 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDenmark1940; + $columns = $census->columns(); - $this->assertCount(15, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertCount(15, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMK', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDaySlashMonth', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionDanish', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertSame('Navn', $columns[0]->abbreviation()); - $this->assertSame('Nærværende', $columns[1]->abbreviation()); - $this->assertSame('Fraværende', $columns[2]->abbreviation()); - $this->assertSame('Køn', $columns[3]->abbreviation()); - $this->assertSame('Fødselsdag', $columns[4]->abbreviation()); - $this->assertSame('Fødselsaar', $columns[5]->abbreviation()); - $this->assertSame('Fødested', $columns[6]->abbreviation()); - $this->assertSame('Statsbergerferhold', $columns[7]->abbreviation()); - $this->assertSame('Civilstand', $columns[8]->abbreviation()); - $this->assertSame('Indgaaelse', $columns[9]->abbreviation()); - $this->assertSame('Stilling i familien', $columns[10]->abbreviation()); - $this->assertSame('Erhverv', $columns[11]->abbreviation()); - $this->assertSame('Virksomhedens', $columns[12]->abbreviation()); - $this->assertSame('Hustruen', $columns[13]->abbreviation()); - $this->assertSame('Døtre', $columns[14]->abbreviation()); + $this->assertSame('Navn', $columns[0]->abbreviation()); + $this->assertSame('Nærværende', $columns[1]->abbreviation()); + $this->assertSame('Fraværende', $columns[2]->abbreviation()); + $this->assertSame('Køn', $columns[3]->abbreviation()); + $this->assertSame('Fødselsdag', $columns[4]->abbreviation()); + $this->assertSame('Fødselsaar', $columns[5]->abbreviation()); + $this->assertSame('Fødested', $columns[6]->abbreviation()); + $this->assertSame('Statsbergerferhold', $columns[7]->abbreviation()); + $this->assertSame('Civilstand', $columns[8]->abbreviation()); + $this->assertSame('Indgaaelse', $columns[9]->abbreviation()); + $this->assertSame('Stilling i familien', $columns[10]->abbreviation()); + $this->assertSame('Erhverv', $columns[11]->abbreviation()); + $this->assertSame('Virksomhedens', $columns[12]->abbreviation()); + $this->assertSame('Hustruen', $columns[13]->abbreviation()); + $this->assertSame('Døtre', $columns[14]->abbreviation()); - $this->assertSame('', $columns[0]->title()); - $this->assertSame('Hvis den i Rubrik 1 opførte Person er midleritidg nærværende d.v.s. har fast Bopæl ????? (er optaget under en anden Address i Folkeregistret), anføres her den faste Bopæls Adresse (Kommunens Navn og den fuldstændige Adresse i denne; for Udlændinge dog kun Landets Navn).', $columns[1]->title()); - $this->assertSame('Hvis den i Rubrik 1 opførte Person er midleritidg fraværende d.v.s. har fast Bopæl paa Tællingsstedet (er optaget underdenne Address i Folkeregistret), men den 5. Novemer ikke er til Stede paa Tællingsstedet, anføres her „fraværende“ og Adressen paa det midlertidige Opholdssted (ved Ophold i Udlandet anføres jun Landets Navn).', $columns[2]->title()); - $this->assertSame('Køn Mand (M) Kvinde (K)', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[8]->title()); - $this->assertSame('Date for det nuværende Ægteskabs Indgaaelse. NB." RUbrikken udfyldes ikke al Enkemaend, Enker, Separerede eller Fraskilte.', $columns[9]->title()); - $this->assertSame('', $columns[10]->title()); - $this->assertSame('', $columns[11]->title()); - $this->assertSame('Virksomhedens (Branchens) Art', $columns[12]->title()); - $this->assertSame('Besvares kun af Hustruen og hjemmeboende Børn over 14 Aar', $columns[13]->title()); - $this->assertSame('Besvares kun af hjemmeboende Døtre over 14 Aar', $columns[14]->title()); - } + $this->assertSame('', $columns[0]->title()); + $this->assertSame('Hvis den i Rubrik 1 opførte Person er midleritidg nærværende d.v.s. har fast Bopæl ????? (er optaget under en anden Address i Folkeregistret), anføres her den faste Bopæls Adresse (Kommunens Navn og den fuldstændige Adresse i denne; for Udlændinge dog kun Landets Navn).', $columns[1]->title()); + $this->assertSame('Hvis den i Rubrik 1 opførte Person er midleritidg fraværende d.v.s. har fast Bopæl paa Tællingsstedet (er optaget underdenne Address i Folkeregistret), men den 5. Novemer ikke er til Stede paa Tællingsstedet, anføres her „fraværende“ og Adressen paa det midlertidige Opholdssted (ved Ophold i Udlandet anføres jun Landets Navn).', $columns[2]->title()); + $this->assertSame('Køn Mand (M) Kvinde (K)', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + $this->assertSame('Ægteskabelig Stillinge. Ugift (U), Gift (G), Enkemand eller Enke (E), Separeret (S), Fraskilt (F).', $columns[8]->title()); + $this->assertSame('Date for det nuværende Ægteskabs Indgaaelse. NB." RUbrikken udfyldes ikke al Enkemaend, Enker, Separerede eller Fraskilte.', $columns[9]->title()); + $this->assertSame('', $columns[10]->title()); + $this->assertSame('', $columns[11]->title()); + $this->assertSame('Virksomhedens (Branchens) Art', $columns[12]->title()); + $this->assertSame('Besvares kun af Hustruen og hjemmeboende Børn over 14 Aar', $columns[13]->title()); + $this->assertSame('Besvares kun af hjemmeboende Døtre over 14 Aar', $columns[14]->title()); + } } diff --git a/tests/app/Census/CensusOfDenmarkTest.php b/tests/app/Census/CensusOfDenmarkTest.php index 7ee5988dd6..9c3a6ad766 100644 --- a/tests/app/Census/CensusOfDenmarkTest.php +++ b/tests/app/Census/CensusOfDenmarkTest.php @@ -19,50 +19,53 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDenmark */ -class CensusOfDenmarkTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark - */ - public function testPlace() { - $census = new CensusOfDenmark; +class CensusOfDenmarkTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark + */ + public function testPlace() + { + $census = new CensusOfDenmark; - $this->assertSame('Danmark', $census->censusPlace()); - } + $this->assertSame('Danmark', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark - */ - public function testAllDates() { - $census = new CensusOfDenmark; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDenmark + */ + public function testAllDates() + { + $census = new CensusOfDenmark; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(22, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1787', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1801', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1803', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1834', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1835', $census_dates[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1840', $census_dates[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1845', $census_dates[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1850', $census_dates[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1855', $census_dates[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1860', $census_dates[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1870', $census_dates[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1880', $census_dates[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1885', $census_dates[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1890', $census_dates[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1901', $census_dates[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1906', $census_dates[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1911', $census_dates[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1916', $census_dates[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1921', $census_dates[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1925', $census_dates[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1930', $census_dates[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1940', $census_dates[21]); - } + $this->assertCount(22, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1787', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1801', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1803', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1834', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1835', $census_dates[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1840', $census_dates[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1845', $census_dates[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1850', $census_dates[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1855', $census_dates[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1860', $census_dates[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1870', $census_dates[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1880', $census_dates[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1885', $census_dates[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1890', $census_dates[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1901', $census_dates[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1906', $census_dates[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1911', $census_dates[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1916', $census_dates[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1921', $census_dates[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1925', $census_dates[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1930', $census_dates[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark1940', $census_dates[21]); + } } diff --git a/tests/app/Census/CensusOfDeutschland1819Test.php b/tests/app/Census/CensusOfDeutschland1819Test.php index 1216d3fe71..2e8ce37c43 100644 --- a/tests/app/Census/CensusOfDeutschland1819Test.php +++ b/tests/app/Census/CensusOfDeutschland1819Test.php @@ -19,70 +19,73 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDeutschland1819 */ -class CensusOfDeutschland1819Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1819 - */ - public function testPlaceAndDate() { - $census = new CensusOfDeutschland1819; +class CensusOfDeutschland1819Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1819 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDeutschland1819; - $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); - $this->assertSame('AUG 1819', $census->censusDate()); - } + $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); + $this->assertSame('AUG 1819', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1819 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDeutschland1819; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1819 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDeutschland1819; + $columns = $census->columns(); - $this->assertCount(13, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertCount(13, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertSame('Nr.', $columns[0]->abbreviation()); - $this->assertSame('Geschlecht', $columns[1]->abbreviation()); - $this->assertSame('Name', $columns[2]->abbreviation()); - $this->assertSame('Geburtsdatum', $columns[3]->abbreviation()); - $this->assertSame('Geburtsort', $columns[4]->abbreviation()); - $this->assertSame('Kirchspiel', $columns[5]->abbreviation()); - $this->assertSame('', $columns[6]->abbreviation()); - $this->assertSame('Stand/Beruf', $columns[7]->abbreviation()); - $this->assertSame('Besitz', $columns[8]->abbreviation()); - $this->assertSame('hier seit', $columns[9]->abbreviation()); - $this->assertSame('Familienstand', $columns[10]->abbreviation()); - $this->assertSame('Religion', $columns[11]->abbreviation()); - $this->assertSame('Bemerkungen', $columns[12]->abbreviation()); + $this->assertSame('Nr.', $columns[0]->abbreviation()); + $this->assertSame('Geschlecht', $columns[1]->abbreviation()); + $this->assertSame('Name', $columns[2]->abbreviation()); + $this->assertSame('Geburtsdatum', $columns[3]->abbreviation()); + $this->assertSame('Geburtsort', $columns[4]->abbreviation()); + $this->assertSame('Kirchspiel', $columns[5]->abbreviation()); + $this->assertSame('', $columns[6]->abbreviation()); + $this->assertSame('Stand/Beruf', $columns[7]->abbreviation()); + $this->assertSame('Besitz', $columns[8]->abbreviation()); + $this->assertSame('hier seit', $columns[9]->abbreviation()); + $this->assertSame('Familienstand', $columns[10]->abbreviation()); + $this->assertSame('Religion', $columns[11]->abbreviation()); + $this->assertSame('Bemerkungen', $columns[12]->abbreviation()); - $this->assertSame('Laufende Num̅er.', $columns[0]->title()); - $this->assertSame('Ob männlichen oder weiblichen Geschlechts.', $columns[1]->title()); - $this->assertSame('Vor- und Zuname.', $columns[2]->title()); - $this->assertSame('Jahr und Tag der Geburt.', $columns[3]->title()); - $this->assertSame('Geburtsort.', $columns[4]->title()); - $this->assertSame('Kirchspiel, wohin der Geburtsort gehört.', $columns[5]->title()); - $this->assertSame('leere Spalte', $columns[6]->title()); - $this->assertSame('Stand und Gewerbe.', $columns[7]->title()); - $this->assertSame('Grundbesitz.', $columns[8]->title()); - $this->assertSame('Wie lange er schon hier ist.', $columns[9]->title()); - $this->assertSame('Ob ledig oder verheirathet.', $columns[10]->title()); - $this->assertSame('Religion.', $columns[11]->title()); - $this->assertSame('Allgemeine Bemerkungen.', $columns[12]->title()); - } + $this->assertSame('Laufende Num̅er.', $columns[0]->title()); + $this->assertSame('Ob männlichen oder weiblichen Geschlechts.', $columns[1]->title()); + $this->assertSame('Vor- und Zuname.', $columns[2]->title()); + $this->assertSame('Jahr und Tag der Geburt.', $columns[3]->title()); + $this->assertSame('Geburtsort.', $columns[4]->title()); + $this->assertSame('Kirchspiel, wohin der Geburtsort gehört.', $columns[5]->title()); + $this->assertSame('leere Spalte', $columns[6]->title()); + $this->assertSame('Stand und Gewerbe.', $columns[7]->title()); + $this->assertSame('Grundbesitz.', $columns[8]->title()); + $this->assertSame('Wie lange er schon hier ist.', $columns[9]->title()); + $this->assertSame('Ob ledig oder verheirathet.', $columns[10]->title()); + $this->assertSame('Religion.', $columns[11]->title()); + $this->assertSame('Allgemeine Bemerkungen.', $columns[12]->title()); + } } diff --git a/tests/app/Census/CensusOfDeutschland1867Test.php b/tests/app/Census/CensusOfDeutschland1867Test.php index 70dcb9a0bd..c2c1a7ed89 100644 --- a/tests/app/Census/CensusOfDeutschland1867Test.php +++ b/tests/app/Census/CensusOfDeutschland1867Test.php @@ -19,100 +19,103 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDeutschland1867 */ -class CensusOfDeutschland1867Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1867 - */ - public function testPlaceAndDate() { - $census = new CensusOfDeutschland1867; +class CensusOfDeutschland1867Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1867 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDeutschland1867; - $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); - $this->assertSame('03 DEC 1867', $census->censusDate()); - } + $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); + $this->assertSame('03 DEC 1867', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1867 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDeutschland1867; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1867 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDeutschland1867; + $columns = $census->columns(); - $this->assertCount(23, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertCount(23, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertSame('1.Nr.', $columns[0]->abbreviation()); - $this->assertSame('2.Vorname', $columns[1]->abbreviation()); - $this->assertSame('3.Familienname', $columns[2]->abbreviation()); - $this->assertSame('4.männlich', $columns[3]->abbreviation()); - $this->assertSame('5.weiblich', $columns[4]->abbreviation()); - $this->assertSame('6.Geburtsjahr', $columns[5]->abbreviation()); - $this->assertSame('7.Religion', $columns[6]->abbreviation()); - $this->assertSame('8.ledig', $columns[7]->abbreviation()); - $this->assertSame('9.verehelicht', $columns[8]->abbreviation()); - $this->assertSame('10.verwittwet', $columns[9]->abbreviation()); - $this->assertSame('11.geschieden', $columns[10]->abbreviation()); - $this->assertSame('12.Stellung', $columns[11]->abbreviation()); - $this->assertSame('13.Stand/Beruf', $columns[12]->abbreviation()); - $this->assertSame('14.StA_M-S', $columns[13]->abbreviation()); - $this->assertSame('15.StA', $columns[14]->abbreviation()); - $this->assertSame('16.', $columns[15]->abbreviation()); - $this->assertSame('17.', $columns[16]->abbreviation()); - $this->assertSame('18.', $columns[17]->abbreviation()); - $this->assertSame('19.', $columns[18]->abbreviation()); - $this->assertSame('20.blind', $columns[19]->abbreviation()); - $this->assertSame('21.taubstumm', $columns[20]->abbreviation()); - $this->assertSame('22.blödsinnig', $columns[21]->abbreviation()); - $this->assertSame('23.irrsinnig', $columns[22]->abbreviation()); + $this->assertSame('1.Nr.', $columns[0]->abbreviation()); + $this->assertSame('2.Vorname', $columns[1]->abbreviation()); + $this->assertSame('3.Familienname', $columns[2]->abbreviation()); + $this->assertSame('4.männlich', $columns[3]->abbreviation()); + $this->assertSame('5.weiblich', $columns[4]->abbreviation()); + $this->assertSame('6.Geburtsjahr', $columns[5]->abbreviation()); + $this->assertSame('7.Religion', $columns[6]->abbreviation()); + $this->assertSame('8.ledig', $columns[7]->abbreviation()); + $this->assertSame('9.verehelicht', $columns[8]->abbreviation()); + $this->assertSame('10.verwittwet', $columns[9]->abbreviation()); + $this->assertSame('11.geschieden', $columns[10]->abbreviation()); + $this->assertSame('12.Stellung', $columns[11]->abbreviation()); + $this->assertSame('13.Stand/Beruf', $columns[12]->abbreviation()); + $this->assertSame('14.StA_M-S', $columns[13]->abbreviation()); + $this->assertSame('15.StA', $columns[14]->abbreviation()); + $this->assertSame('16.', $columns[15]->abbreviation()); + $this->assertSame('17.', $columns[16]->abbreviation()); + $this->assertSame('18.', $columns[17]->abbreviation()); + $this->assertSame('19.', $columns[18]->abbreviation()); + $this->assertSame('20.blind', $columns[19]->abbreviation()); + $this->assertSame('21.taubstumm', $columns[20]->abbreviation()); + $this->assertSame('22.blödsinnig', $columns[21]->abbreviation()); + $this->assertSame('23.irrsinnig', $columns[22]->abbreviation()); - $this->assertSame('Ordnungs-Nummer (1-15).', $columns[0]->title()); - $this->assertSame('I. Vor- und Familien-Name jeder Person. Vorname', $columns[1]->title()); - $this->assertSame('I. Vor- und Familien-Name jeder Person. Familienname.', $columns[2]->title()); - $this->assertSame('II. Geschlecht männlich.', $columns[3]->title()); - $this->assertSame('II. Geschlecht weiblich.', $columns[4]->title()); - $this->assertSame('III. Alter.', $columns[5]->title()); - $this->assertSame('IV. Religionsbekenntnis.', $columns[6]->title()); - $this->assertSame('V. Familienstand. ledig.', $columns[7]->title()); - $this->assertSame('V. Familienstand. verehelicht.', $columns[8]->title()); - $this->assertSame('V. Familienstand. verwittwet.', $columns[9]->title()); - $this->assertSame('V. Familienstand. geschieden.', $columns[10]->title()); - $this->assertSame('V. Familienstand. Verhältnis der Familienglieder zum Haushaltungsvorstand.', $columns[11]->title()); - $this->assertSame('VI. Stand, Beruf oder Vorbereitung zum Beruf, Arbeits- und Dienstverhältnis.', $columns[12]->title()); - $this->assertSame('VII. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.', $columns[13]->title()); - $this->assertSame('VII. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?', $columns[14]->title()); - $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Norddeutscher und Zollvereins- See- und Flußschiffer.', $columns[15]->title()); - $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Reisender im Gasthof.', $columns[16]->title()); - $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Gast der Familie (zum Besuch aus).', $columns[17]->title()); - $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Alle übrigen Anwesenden.', $columns[18]->title()); - $this->assertSame('IX. Besondere Mängel einzelner Individuen. blind auf beiden Augen.', $columns[19]->title()); - $this->assertSame('IX. Besondere Mängel einzelner Individuen. taubstumm.', $columns[20]->title()); - $this->assertSame('IX. Besondere Mängel einzelner Individuen. blödsinnig.', $columns[21]->title()); - $this->assertSame('IX. Besondere Mängel einzelner Individuen. irrsinnig.', $columns[22]->title()); - } + $this->assertSame('Ordnungs-Nummer (1-15).', $columns[0]->title()); + $this->assertSame('I. Vor- und Familien-Name jeder Person. Vorname', $columns[1]->title()); + $this->assertSame('I. Vor- und Familien-Name jeder Person. Familienname.', $columns[2]->title()); + $this->assertSame('II. Geschlecht männlich.', $columns[3]->title()); + $this->assertSame('II. Geschlecht weiblich.', $columns[4]->title()); + $this->assertSame('III. Alter.', $columns[5]->title()); + $this->assertSame('IV. Religionsbekenntnis.', $columns[6]->title()); + $this->assertSame('V. Familienstand. ledig.', $columns[7]->title()); + $this->assertSame('V. Familienstand. verehelicht.', $columns[8]->title()); + $this->assertSame('V. Familienstand. verwittwet.', $columns[9]->title()); + $this->assertSame('V. Familienstand. geschieden.', $columns[10]->title()); + $this->assertSame('V. Familienstand. Verhältnis der Familienglieder zum Haushaltungsvorstand.', $columns[11]->title()); + $this->assertSame('VI. Stand, Beruf oder Vorbereitung zum Beruf, Arbeits- und Dienstverhältnis.', $columns[12]->title()); + $this->assertSame('VII. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.', $columns[13]->title()); + $this->assertSame('VII. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?', $columns[14]->title()); + $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Norddeutscher und Zollvereins- See- und Flußschiffer.', $columns[15]->title()); + $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Reisender im Gasthof.', $columns[16]->title()); + $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Gast der Familie (zum Besuch aus).', $columns[17]->title()); + $this->assertSame('VIII. Art des Aufenthalts am Zählungsort. Alle übrigen Anwesenden.', $columns[18]->title()); + $this->assertSame('IX. Besondere Mängel einzelner Individuen. blind auf beiden Augen.', $columns[19]->title()); + $this->assertSame('IX. Besondere Mängel einzelner Individuen. taubstumm.', $columns[20]->title()); + $this->assertSame('IX. Besondere Mängel einzelner Individuen. blödsinnig.', $columns[21]->title()); + $this->assertSame('IX. Besondere Mängel einzelner Individuen. irrsinnig.', $columns[22]->title()); + } } diff --git a/tests/app/Census/CensusOfDeutschland1900Test.php b/tests/app/Census/CensusOfDeutschland1900Test.php index 2671dacd15..6a5feeb482 100644 --- a/tests/app/Census/CensusOfDeutschland1900Test.php +++ b/tests/app/Census/CensusOfDeutschland1900Test.php @@ -19,112 +19,115 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDeutschland1900 */ -class CensusOfDeutschland1900Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1900 - */ - public function testPlaceAndDate() { - $census = new CensusOfDeutschland1900; +class CensusOfDeutschland1900Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1900 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDeutschland1900; - $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); - $this->assertSame('01 DEC 1900', $census->censusDate()); - } + $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); + $this->assertSame('01 DEC 1900', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1900 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDeutschland1900; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1900 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDeutschland1900; + $columns = $census->columns(); - $this->assertCount(27, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDayDotMonthYear', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); + $this->assertCount(27, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDayDotMonthYear', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); - $this->assertSame('Lfd.Nr.', $columns[0]->abbreviation()); - $this->assertSame('Vorname', $columns[1]->abbreviation()); - $this->assertSame('Familienname', $columns[2]->abbreviation()); - $this->assertSame('Stellung', $columns[3]->abbreviation()); - $this->assertSame('männlich', $columns[4]->abbreviation()); - $this->assertSame('weiblich', $columns[5]->abbreviation()); - $this->assertSame('Blind', $columns[6]->abbreviation()); - $this->assertSame('Taubstumm', $columns[7]->abbreviation()); - $this->assertSame('Bemerkungen', $columns[8]->abbreviation()); - $this->assertSame('', $columns[9]->abbreviation()); - $this->assertSame('ZK 1.Name', $columns[10]->abbreviation()); - $this->assertSame('ZK 2.Geschlecht', $columns[11]->abbreviation()); - $this->assertSame('ZK 3.Familienstand', $columns[12]->abbreviation()); - $this->assertSame('ZK 4.Alter', $columns[13]->abbreviation()); - $this->assertSame('ZK 5.Geburtsort', $columns[14]->abbreviation()); - $this->assertSame('ZK 5.Land/Provinz', $columns[15]->abbreviation()); - $this->assertSame('ZK 6.Beruf/Stand', $columns[16]->abbreviation()); - $this->assertSame('ZK 7a.Gemeinde Wohnort', $columns[17]->abbreviation()); - $this->assertSame('ZK 7a.Land/Provinz', $columns[18]->abbreviation()); - $this->assertSame('ZK 7b.Gemeinde Erwerbsort', $columns[19]->abbreviation()); - $this->assertSame('ZK 7b.Land/Provinz', $columns[20]->abbreviation()); - $this->assertSame('ZK 8.Religion', $columns[21]->abbreviation()); - $this->assertSame('ZK 9.Muttersprache', $columns[22]->abbreviation()); - $this->assertSame('ZK 10.StA', $columns[23]->abbreviation()); - $this->assertSame('ZK 11.Dienstgrad', $columns[24]->abbreviation()); - $this->assertSame('ZK 11.Einheit', $columns[25]->abbreviation()); - $this->assertSame('ZK 12.Gebrechen', $columns[26]->abbreviation()); + $this->assertSame('Lfd.Nr.', $columns[0]->abbreviation()); + $this->assertSame('Vorname', $columns[1]->abbreviation()); + $this->assertSame('Familienname', $columns[2]->abbreviation()); + $this->assertSame('Stellung', $columns[3]->abbreviation()); + $this->assertSame('männlich', $columns[4]->abbreviation()); + $this->assertSame('weiblich', $columns[5]->abbreviation()); + $this->assertSame('Blind', $columns[6]->abbreviation()); + $this->assertSame('Taubstumm', $columns[7]->abbreviation()); + $this->assertSame('Bemerkungen', $columns[8]->abbreviation()); + $this->assertSame('', $columns[9]->abbreviation()); + $this->assertSame('ZK 1.Name', $columns[10]->abbreviation()); + $this->assertSame('ZK 2.Geschlecht', $columns[11]->abbreviation()); + $this->assertSame('ZK 3.Familienstand', $columns[12]->abbreviation()); + $this->assertSame('ZK 4.Alter', $columns[13]->abbreviation()); + $this->assertSame('ZK 5.Geburtsort', $columns[14]->abbreviation()); + $this->assertSame('ZK 5.Land/Provinz', $columns[15]->abbreviation()); + $this->assertSame('ZK 6.Beruf/Stand', $columns[16]->abbreviation()); + $this->assertSame('ZK 7a.Gemeinde Wohnort', $columns[17]->abbreviation()); + $this->assertSame('ZK 7a.Land/Provinz', $columns[18]->abbreviation()); + $this->assertSame('ZK 7b.Gemeinde Erwerbsort', $columns[19]->abbreviation()); + $this->assertSame('ZK 7b.Land/Provinz', $columns[20]->abbreviation()); + $this->assertSame('ZK 8.Religion', $columns[21]->abbreviation()); + $this->assertSame('ZK 9.Muttersprache', $columns[22]->abbreviation()); + $this->assertSame('ZK 10.StA', $columns[23]->abbreviation()); + $this->assertSame('ZK 11.Dienstgrad', $columns[24]->abbreviation()); + $this->assertSame('ZK 11.Einheit', $columns[25]->abbreviation()); + $this->assertSame('ZK 12.Gebrechen', $columns[26]->abbreviation()); - $this->assertSame('Laufende Nummer', $columns[0]->title()); - $this->assertSame('Vorname', $columns[1]->title()); - $this->assertSame('Familienname', $columns[2]->title()); - $this->assertSame('Verwandtschaft oder sonstige Stellung zum Haushaltungsvorstand', $columns[3]->title()); - $this->assertSame('Geschlecht männlich', $columns[4]->title()); - $this->assertSame('Geschlecht weiblich', $columns[5]->title()); - $this->assertSame('Blind auf beiden Augen', $columns[6]->title()); - $this->assertSame('Taubstumm', $columns[7]->title()); - $this->assertSame('Bemerkungen', $columns[8]->title()); - $this->assertSame('Nachfolgend die detaillierten Zählkartenangaben', $columns[9]->title()); - $this->assertSame('1. Vor- und Familienname:', $columns[10]->title()); - $this->assertSame('2. Geschlecht:', $columns[11]->title()); - $this->assertSame('3. Familienstand:', $columns[12]->title()); - $this->assertSame('4. Alter: geboren den ... im Jahre ...', $columns[13]->title()); - $this->assertSame('5. Geburtsort: ... im Bezirk (Amt) ...', $columns[14]->title()); - $this->assertSame('für außerhalb des Großherzogthums Geborene auch Geburtsland, für in Preußen Geborene auch Provinz: ...', $columns[15]->title()); - $this->assertSame('6. Beruf, Stand, Erwerb, Gewerbe, Geschäft oder Nahrungszweig:', $columns[16]->title()); - $this->assertSame('7.a. Gemeinde (Ortschaft), in welcher der Wohnort (Wohnung), bei verheiratheten Personen der Familienwohnsitz liegt:', $columns[17]->title()); - $this->assertSame('für außerhalb des Großherzogthums Wohnende auch Staat und für in Preußen Wohnende auch Provinz: ...', $columns[18]->title()); - $this->assertSame('7.b. Gemeinde (Ortschaft), in welcher der Beruf (die Erwerbsthätigkeit) zur Zeit ausgeübt wird oder zuletzt ausgeübt wurde:', $columns[19]->title()); - $this->assertSame('für außerhalb des Großherzogthums Arbeitende auch Staat und für in Preußen Arbeitende auch Provinz: ...', $columns[20]->title()); - $this->assertSame('8. Religionsbekenntnis:', $columns[21]->title()); - $this->assertSame('9. Muttersprache (ob deutsch oder welche andere Sprache?):', $columns[22]->title()); - $this->assertSame('10. Staatsangehörigkeit:', $columns[23]->title()); - $this->assertSame('11. Für Militärpersonen im aktiven Dienste: Dienstgrad:', $columns[24]->title()); - $this->assertSame('Truppentheil, Kommando- oder Verwaltungsbehörde:', $columns[25]->title()); - $this->assertSame('12. Etwaige körperliche Mängel und Gebrechen:', $columns[26]->title()); - } + $this->assertSame('Laufende Nummer', $columns[0]->title()); + $this->assertSame('Vorname', $columns[1]->title()); + $this->assertSame('Familienname', $columns[2]->title()); + $this->assertSame('Verwandtschaft oder sonstige Stellung zum Haushaltungsvorstand', $columns[3]->title()); + $this->assertSame('Geschlecht männlich', $columns[4]->title()); + $this->assertSame('Geschlecht weiblich', $columns[5]->title()); + $this->assertSame('Blind auf beiden Augen', $columns[6]->title()); + $this->assertSame('Taubstumm', $columns[7]->title()); + $this->assertSame('Bemerkungen', $columns[8]->title()); + $this->assertSame('Nachfolgend die detaillierten Zählkartenangaben', $columns[9]->title()); + $this->assertSame('1. Vor- und Familienname:', $columns[10]->title()); + $this->assertSame('2. Geschlecht:', $columns[11]->title()); + $this->assertSame('3. Familienstand:', $columns[12]->title()); + $this->assertSame('4. Alter: geboren den ... im Jahre ...', $columns[13]->title()); + $this->assertSame('5. Geburtsort: ... im Bezirk (Amt) ...', $columns[14]->title()); + $this->assertSame('für außerhalb des Großherzogthums Geborene auch Geburtsland, für in Preußen Geborene auch Provinz: ...', $columns[15]->title()); + $this->assertSame('6. Beruf, Stand, Erwerb, Gewerbe, Geschäft oder Nahrungszweig:', $columns[16]->title()); + $this->assertSame('7.a. Gemeinde (Ortschaft), in welcher der Wohnort (Wohnung), bei verheiratheten Personen der Familienwohnsitz liegt:', $columns[17]->title()); + $this->assertSame('für außerhalb des Großherzogthums Wohnende auch Staat und für in Preußen Wohnende auch Provinz: ...', $columns[18]->title()); + $this->assertSame('7.b. Gemeinde (Ortschaft), in welcher der Beruf (die Erwerbsthätigkeit) zur Zeit ausgeübt wird oder zuletzt ausgeübt wurde:', $columns[19]->title()); + $this->assertSame('für außerhalb des Großherzogthums Arbeitende auch Staat und für in Preußen Arbeitende auch Provinz: ...', $columns[20]->title()); + $this->assertSame('8. Religionsbekenntnis:', $columns[21]->title()); + $this->assertSame('9. Muttersprache (ob deutsch oder welche andere Sprache?):', $columns[22]->title()); + $this->assertSame('10. Staatsangehörigkeit:', $columns[23]->title()); + $this->assertSame('11. Für Militärpersonen im aktiven Dienste: Dienstgrad:', $columns[24]->title()); + $this->assertSame('Truppentheil, Kommando- oder Verwaltungsbehörde:', $columns[25]->title()); + $this->assertSame('12. Etwaige körperliche Mängel und Gebrechen:', $columns[26]->title()); + } } diff --git a/tests/app/Census/CensusOfDeutschland1919Test.php b/tests/app/Census/CensusOfDeutschland1919Test.php index 067d437e63..5f0b4341c4 100644 --- a/tests/app/Census/CensusOfDeutschland1919Test.php +++ b/tests/app/Census/CensusOfDeutschland1919Test.php @@ -19,82 +19,85 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDeutschland1919 */ -class CensusOfDeutschland1919Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1919 - */ - public function testPlaceAndDate() { - $census = new CensusOfDeutschland1919; +class CensusOfDeutschland1919Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1919 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDeutschland1919; - $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); - $this->assertSame('08 OCT 1919', $census->censusDate()); - } + $this->assertSame('Mecklenburg-Schwerin, Deutschland', $census->censusPlace()); + $this->assertSame('08 OCT 1919', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1919 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDeutschland1919; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland1919 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDeutschland1919; + $columns = $census->columns(); - $this->assertCount(17, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDay', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthMonth', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertCount(17, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHeadGerman', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDay', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthMonth', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertSame('Nummer', $columns[0]->abbreviation()); - $this->assertSame('Vorname', $columns[1]->abbreviation()); - $this->assertSame('Familienname', $columns[2]->abbreviation()); - $this->assertSame('Stellung im Haushalt', $columns[3]->abbreviation()); - $this->assertSame('männlich', $columns[4]->abbreviation()); - $this->assertSame('weiblich', $columns[5]->abbreviation()); - $this->assertSame('Familienstand', $columns[6]->abbreviation()); - $this->assertSame('Geburts-Tag', $columns[7]->abbreviation()); - $this->assertSame('Geburts-Monat', $columns[8]->abbreviation()); - $this->assertSame('Geburts-Jahr', $columns[9]->abbreviation()); - $this->assertSame('Geburtsort', $columns[10]->abbreviation()); - $this->assertSame('Amt, Kreis, Bezirk', $columns[11]->abbreviation()); - $this->assertSame('StA', $columns[12]->abbreviation()); - $this->assertSame('Gemeinde Brotversorgung', $columns[13]->abbreviation()); - $this->assertSame('Wohn-/ Aufenthaltsort', $columns[14]->abbreviation()); - $this->assertSame('Dienstgrad', $columns[15]->abbreviation()); - $this->assertSame('Kriegsgefangener', $columns[16]->abbreviation()); + $this->assertSame('Nummer', $columns[0]->abbreviation()); + $this->assertSame('Vorname', $columns[1]->abbreviation()); + $this->assertSame('Familienname', $columns[2]->abbreviation()); + $this->assertSame('Stellung im Haushalt', $columns[3]->abbreviation()); + $this->assertSame('männlich', $columns[4]->abbreviation()); + $this->assertSame('weiblich', $columns[5]->abbreviation()); + $this->assertSame('Familienstand', $columns[6]->abbreviation()); + $this->assertSame('Geburts-Tag', $columns[7]->abbreviation()); + $this->assertSame('Geburts-Monat', $columns[8]->abbreviation()); + $this->assertSame('Geburts-Jahr', $columns[9]->abbreviation()); + $this->assertSame('Geburtsort', $columns[10]->abbreviation()); + $this->assertSame('Amt, Kreis, Bezirk', $columns[11]->abbreviation()); + $this->assertSame('StA', $columns[12]->abbreviation()); + $this->assertSame('Gemeinde Brotversorgung', $columns[13]->abbreviation()); + $this->assertSame('Wohn-/ Aufenthaltsort', $columns[14]->abbreviation()); + $this->assertSame('Dienstgrad', $columns[15]->abbreviation()); + $this->assertSame('Kriegsgefangener', $columns[16]->abbreviation()); - $this->assertSame('Laufende Nummer', $columns[0]->title()); - $this->assertSame('Vorname', $columns[1]->title()); - $this->assertSame('Familienname', $columns[2]->title()); - $this->assertSame('Stellung im Haushalt', $columns[3]->title()); - $this->assertSame('Geschlecht männlich', $columns[4]->title()); - $this->assertSame('Geschlecht weiblich', $columns[5]->title()); - $this->assertSame('Familienstand', $columns[6]->title()); - $this->assertSame('Geburts-Tag', $columns[7]->title()); - $this->assertSame('Geburts-Monat', $columns[8]->title()); - $this->assertSame('Geburts-Jahr', $columns[9]->title()); - $this->assertSame('Name des Geburtsorts', $columns[10]->title()); - $this->assertSame('Amt, Kreis oder sonstiger obrigkeitlicher Bezirk', $columns[11]->title()); - $this->assertSame('Staatsangehörigkeit', $columns[12]->title()); - $this->assertSame('Gemeinde der Brotversorgung', $columns[13]->title()); - $this->assertSame('Wohnort bei nur vorübergehend Anwesenden. Aufenthaltsort bei vorübergehend Abwesenden', $columns[14]->title()); - $this->assertSame('Für Militärpersonen: Angabe des Dienstgrades', $columns[15]->title()); - $this->assertSame('Angabe ob Kriegsgefangener', $columns[16]->title()); - } + $this->assertSame('Laufende Nummer', $columns[0]->title()); + $this->assertSame('Vorname', $columns[1]->title()); + $this->assertSame('Familienname', $columns[2]->title()); + $this->assertSame('Stellung im Haushalt', $columns[3]->title()); + $this->assertSame('Geschlecht männlich', $columns[4]->title()); + $this->assertSame('Geschlecht weiblich', $columns[5]->title()); + $this->assertSame('Familienstand', $columns[6]->title()); + $this->assertSame('Geburts-Tag', $columns[7]->title()); + $this->assertSame('Geburts-Monat', $columns[8]->title()); + $this->assertSame('Geburts-Jahr', $columns[9]->title()); + $this->assertSame('Name des Geburtsorts', $columns[10]->title()); + $this->assertSame('Amt, Kreis oder sonstiger obrigkeitlicher Bezirk', $columns[11]->title()); + $this->assertSame('Staatsangehörigkeit', $columns[12]->title()); + $this->assertSame('Gemeinde der Brotversorgung', $columns[13]->title()); + $this->assertSame('Wohnort bei nur vorübergehend Anwesenden. Aufenthaltsort bei vorübergehend Abwesenden', $columns[14]->title()); + $this->assertSame('Für Militärpersonen: Angabe des Dienstgrades', $columns[15]->title()); + $this->assertSame('Angabe ob Kriegsgefangener', $columns[16]->title()); + } } diff --git a/tests/app/Census/CensusOfDeutschlandNL1867Test.php b/tests/app/Census/CensusOfDeutschlandNL1867Test.php index 4cd34b8fe9..b49ca8d49a 100644 --- a/tests/app/Census/CensusOfDeutschlandNL1867Test.php +++ b/tests/app/Census/CensusOfDeutschlandNL1867Test.php @@ -19,85 +19,88 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDeutschlandNL1867 */ -class CensusOfDeutschlandNL1867Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867 - */ - public function testPlaceAndDate() { - $census = new CensusOfDeutschlandNL1867; +class CensusOfDeutschlandNL1867Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867 + */ + public function testPlaceAndDate() + { + $census = new CensusOfDeutschlandNL1867; - $this->assertSame('Mecklenburg-Schwerin (Nachtragsliste), Deutschland', $census->censusPlace()); - $this->assertSame('03 DEC 1867', $census->censusDate()); - } + $this->assertSame('Mecklenburg-Schwerin (Nachtragsliste), Deutschland', $census->censusPlace()); + $this->assertSame('03 DEC 1867', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfDeutschlandNL1867; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfDeutschlandNL1867; + $columns = $census->columns(); - $this->assertCount(18, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertCount(18, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnReligion', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertSame('1.Nr.', $columns[0]->abbreviation()); - $this->assertSame('2.Vorname', $columns[1]->abbreviation()); - $this->assertSame('3.Familienname', $columns[2]->abbreviation()); - $this->assertSame('4.männlich', $columns[3]->abbreviation()); - $this->assertSame('5.weiblich', $columns[4]->abbreviation()); - $this->assertSame('6.Geburtsjahr', $columns[5]->abbreviation()); - $this->assertSame('7.Religion', $columns[6]->abbreviation()); - $this->assertSame('8.ledig', $columns[7]->abbreviation()); - $this->assertSame('9.verehelicht', $columns[8]->abbreviation()); - $this->assertSame('10.verwittwet', $columns[9]->abbreviation()); - $this->assertSame('11.geschieden', $columns[10]->abbreviation()); - $this->assertSame('12.StA_M-S', $columns[11]->abbreviation()); - $this->assertSame('13.StA', $columns[12]->abbreviation()); - $this->assertSame('14.', $columns[13]->abbreviation()); - $this->assertSame('15.', $columns[14]->abbreviation()); - $this->assertSame('16.', $columns[15]->abbreviation()); - $this->assertSame('17.', $columns[16]->abbreviation()); - $this->assertSame('18.Aufenthaltsort', $columns[17]->abbreviation()); + $this->assertSame('1.Nr.', $columns[0]->abbreviation()); + $this->assertSame('2.Vorname', $columns[1]->abbreviation()); + $this->assertSame('3.Familienname', $columns[2]->abbreviation()); + $this->assertSame('4.männlich', $columns[3]->abbreviation()); + $this->assertSame('5.weiblich', $columns[4]->abbreviation()); + $this->assertSame('6.Geburtsjahr', $columns[5]->abbreviation()); + $this->assertSame('7.Religion', $columns[6]->abbreviation()); + $this->assertSame('8.ledig', $columns[7]->abbreviation()); + $this->assertSame('9.verehelicht', $columns[8]->abbreviation()); + $this->assertSame('10.verwittwet', $columns[9]->abbreviation()); + $this->assertSame('11.geschieden', $columns[10]->abbreviation()); + $this->assertSame('12.StA_M-S', $columns[11]->abbreviation()); + $this->assertSame('13.StA', $columns[12]->abbreviation()); + $this->assertSame('14.', $columns[13]->abbreviation()); + $this->assertSame('15.', $columns[14]->abbreviation()); + $this->assertSame('16.', $columns[15]->abbreviation()); + $this->assertSame('17.', $columns[16]->abbreviation()); + $this->assertSame('18.Aufenthaltsort', $columns[17]->abbreviation()); - $this->assertSame('Ordnungs-Nummer.', $columns[0]->title()); - $this->assertSame('I. Vor- und Familienname jeder Person. Vorname.', $columns[1]->title()); - $this->assertSame('I. Vor- und Familienname jeder Person. Familienname.', $columns[2]->title()); - $this->assertSame('II. Geschlecht männlich.', $columns[3]->title()); - $this->assertSame('II. Geschlecht weiblich.', $columns[4]->title()); - $this->assertSame('III. Alter.', $columns[5]->title()); - $this->assertSame('IV. Religionsbekenntnis.', $columns[6]->title()); - $this->assertSame('V. Familienstand. ledig.', $columns[7]->title()); - $this->assertSame('V. Familienstand. verehelicht.', $columns[8]->title()); - $this->assertSame('V. Familienstand. verwittwet.', $columns[9]->title()); - $this->assertSame('V. Familienstand. geschieden.', $columns[10]->title()); - $this->assertSame('VI. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.', $columns[11]->title()); - $this->assertSame('VI. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?', $columns[12]->title()); - $this->assertSame('VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende als See- oder Flußschiffer.', $columns[13]->title()); - $this->assertSame('VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Land- oder Seereisen.', $columns[14]->title()); - $this->assertSame('VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Besuch außerhalb des Orts.', $columns[15]->title()); - $this->assertSame('VII. Art des Aufenthalts am Zählungsort. Ueber ein Jahr, oder in anderer Art als nach Spalte 14 bis 16 Abwesende.', $columns[16]->title()); - $this->assertSame('VIII. Vermuthlicher Aufenthaltsort zur Zählungszeit.', $columns[17]->title()); - } + $this->assertSame('Ordnungs-Nummer.', $columns[0]->title()); + $this->assertSame('I. Vor- und Familienname jeder Person. Vorname.', $columns[1]->title()); + $this->assertSame('I. Vor- und Familienname jeder Person. Familienname.', $columns[2]->title()); + $this->assertSame('II. Geschlecht männlich.', $columns[3]->title()); + $this->assertSame('II. Geschlecht weiblich.', $columns[4]->title()); + $this->assertSame('III. Alter.', $columns[5]->title()); + $this->assertSame('IV. Religionsbekenntnis.', $columns[6]->title()); + $this->assertSame('V. Familienstand. ledig.', $columns[7]->title()); + $this->assertSame('V. Familienstand. verehelicht.', $columns[8]->title()); + $this->assertSame('V. Familienstand. verwittwet.', $columns[9]->title()); + $this->assertSame('V. Familienstand. geschieden.', $columns[10]->title()); + $this->assertSame('VI. Staatsangehörigkeit. Mecklenburg-Schwerinscher Unterthan.', $columns[11]->title()); + $this->assertSame('VI. Staatsangehörigkeit. Anderen Staaten angehörig. Welchem Staat?', $columns[12]->title()); + $this->assertSame('VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende als See- oder Flußschiffer.', $columns[13]->title()); + $this->assertSame('VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Land- oder Seereisen.', $columns[14]->title()); + $this->assertSame('VII. Art des Abwesenheit vom Zählungsorte. Nicht über ein Jahr Abwesende auf Besuch außerhalb des Orts.', $columns[15]->title()); + $this->assertSame('VII. Art des Aufenthalts am Zählungsort. Ueber ein Jahr, oder in anderer Art als nach Spalte 14 bis 16 Abwesende.', $columns[16]->title()); + $this->assertSame('VIII. Vermuthlicher Aufenthaltsort zur Zählungszeit.', $columns[17]->title()); + } } diff --git a/tests/app/Census/CensusOfDeutschlandTest.php b/tests/app/Census/CensusOfDeutschlandTest.php index 4022c1201e..b5cadc3492 100644 --- a/tests/app/Census/CensusOfDeutschlandTest.php +++ b/tests/app/Census/CensusOfDeutschlandTest.php @@ -19,33 +19,36 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfDeutschland */ -class CensusOfDeutschlandTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland - */ - public function testPlace() { - $census = new CensusOfDeutschland; +class CensusOfDeutschlandTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland + */ + public function testPlace() + { + $census = new CensusOfDeutschland; - $this->assertSame('Deutschland', $census->censusPlace()); - } + $this->assertSame('Deutschland', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland - */ - public function testAllDates() { - $census = new CensusOfDeutschland; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfDeutschland + */ + public function testAllDates() + { + $census = new CensusOfDeutschland; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(5, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1819', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1867', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1900', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1919', $census_dates[4]); - } + $this->assertCount(5, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1819', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1867', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschlandNL1867', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1900', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland1919', $census_dates[4]); + } } diff --git a/tests/app/Census/CensusOfEngland1841Test.php b/tests/app/Census/CensusOfEngland1841Test.php index a265206154..823f1ba6a0 100644 --- a/tests/app/Census/CensusOfEngland1841Test.php +++ b/tests/app/Census/CensusOfEngland1841Test.php @@ -19,49 +19,52 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1841 */ -class CensusOfEngland1841Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1841 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1841; +class CensusOfEngland1841Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1841 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1841; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('06 JUN 1841', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('06 JUN 1841', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1841 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1841; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1841 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1841; + $columns = $census->columns(); - $this->assertCount(6, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBornForeignParts', $columns[5]); + $this->assertCount(6, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBornForeignParts', $columns[5]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('AgeM', $columns[1]->abbreviation()); - $this->assertSame('AgeF', $columns[2]->abbreviation()); - $this->assertSame('Occupation', $columns[3]->abbreviation()); - $this->assertSame('BiC', $columns[4]->abbreviation()); - $this->assertSame('SIF', $columns[5]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('AgeM', $columns[1]->abbreviation()); + $this->assertSame('AgeF', $columns[2]->abbreviation()); + $this->assertSame('Occupation', $columns[3]->abbreviation()); + $this->assertSame('BiC', $columns[4]->abbreviation()); + $this->assertSame('SIF', $columns[5]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Age (males)', $columns[1]->title()); - $this->assertSame('Age (females)', $columns[2]->title()); - $this->assertSame('Profession, trade, employment or of independent means', $columns[3]->title()); - $this->assertSame('Born in same county', $columns[4]->title()); - $this->assertSame('Born in Scotland, Ireland or foreign parts', $columns[5]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Age (males)', $columns[1]->title()); + $this->assertSame('Age (females)', $columns[2]->title()); + $this->assertSame('Profession, trade, employment or of independent means', $columns[3]->title()); + $this->assertSame('Born in same county', $columns[4]->title()); + $this->assertSame('Born in Scotland, Ireland or foreign parts', $columns[5]->title()); + } } diff --git a/tests/app/Census/CensusOfEngland1851Test.php b/tests/app/Census/CensusOfEngland1851Test.php index b22710a0d5..1ab28a8872 100644 --- a/tests/app/Census/CensusOfEngland1851Test.php +++ b/tests/app/Census/CensusOfEngland1851Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1851 */ -class CensusOfEngland1851Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1851 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1851; +class CensusOfEngland1851Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1851 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1851; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('30 MAR 1851', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('30 MAR 1851', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1851 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1851; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1851 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1851; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfEngland1861Test.php b/tests/app/Census/CensusOfEngland1861Test.php index 94815e5aff..d470953a11 100644 --- a/tests/app/Census/CensusOfEngland1861Test.php +++ b/tests/app/Census/CensusOfEngland1861Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1861 */ -class CensusOfEngland1861Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1861 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1861; +class CensusOfEngland1861Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1861 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1861; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('07 APR 1861', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('07 APR 1861', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1861 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1861; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1861 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1861; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfEngland1871Test.php b/tests/app/Census/CensusOfEngland1871Test.php index beb6a74dd6..542b94057e 100644 --- a/tests/app/Census/CensusOfEngland1871Test.php +++ b/tests/app/Census/CensusOfEngland1871Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1871 */ -class CensusOfEngland1871Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1871 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1871; +class CensusOfEngland1871Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1871 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1871; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('02 APR 1871', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('02 APR 1871', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1871 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1871; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1871 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1871; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfEngland1881Test.php b/tests/app/Census/CensusOfEngland1881Test.php index 5430ab1f34..1230d89310 100644 --- a/tests/app/Census/CensusOfEngland1881Test.php +++ b/tests/app/Census/CensusOfEngland1881Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1881 */ -class CensusOfEngland1881Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1881 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1881; +class CensusOfEngland1881Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1881 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1881; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('03 APR 1881', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('03 APR 1881', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1881 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1881; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1881 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1881; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); // Infirm, etc. + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); // Infirm, etc. - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfEngland1891Test.php b/tests/app/Census/CensusOfEngland1891Test.php index 6e15fc5aea..e853ad1d0d 100644 --- a/tests/app/Census/CensusOfEngland1891Test.php +++ b/tests/app/Census/CensusOfEngland1891Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1891 */ -class CensusOfEngland1891Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1891 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1891; +class CensusOfEngland1891Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1891 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1891; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('05 APR 1891', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('05 APR 1891', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1891 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1891; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1891 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1891; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Empl', $columns[6]->abbreviation()); - $this->assertSame('Empd', $columns[7]->abbreviation()); - $this->assertSame('OAC', $columns[8]->abbreviation()); - $this->assertSame('Birthplace', $columns[9]->abbreviation()); - $this->assertSame('Infirm', $columns[10]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Empl', $columns[6]->abbreviation()); + $this->assertSame('Empd', $columns[7]->abbreviation()); + $this->assertSame('OAC', $columns[8]->abbreviation()); + $this->assertSame('Birthplace', $columns[9]->abbreviation()); + $this->assertSame('Infirm', $columns[10]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Employer', $columns[6]->title()); - $this->assertSame('Employed', $columns[7]->title()); - $this->assertSame('Own account', $columns[8]->title()); - $this->assertSame('Where born', $columns[9]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, lunatic or imbecile', $columns[10]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Employer', $columns[6]->title()); + $this->assertSame('Employed', $columns[7]->title()); + $this->assertSame('Own account', $columns[8]->title()); + $this->assertSame('Where born', $columns[9]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, lunatic or imbecile', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfEngland1901Test.php b/tests/app/Census/CensusOfEngland1901Test.php index d87806fc00..e623a940dc 100644 --- a/tests/app/Census/CensusOfEngland1901Test.php +++ b/tests/app/Census/CensusOfEngland1901Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1901 */ -class CensusOfEngland1901Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1901 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1901; +class CensusOfEngland1901Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1901 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1901; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('31 MAR 1901', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('31 MAR 1901', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1901 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1901; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1901 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1901; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Emp', $columns[6]->abbreviation()); - $this->assertSame('Home', $columns[7]->abbreviation()); - $this->assertSame('Birthplace', $columns[8]->abbreviation()); - $this->assertSame('Infirm', $columns[9]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Emp', $columns[6]->abbreviation()); + $this->assertSame('Home', $columns[7]->abbreviation()); + $this->assertSame('Birthplace', $columns[8]->abbreviation()); + $this->assertSame('Infirm', $columns[9]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Employer, worker or own account', $columns[6]->title()); - $this->assertSame('Working at home', $columns[7]->title()); - $this->assertSame('Where born', $columns[8]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded', $columns[9]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Employer, worker or own account', $columns[6]->title()); + $this->assertSame('Working at home', $columns[7]->title()); + $this->assertSame('Where born', $columns[8]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfEngland1911Test.php b/tests/app/Census/CensusOfEngland1911Test.php index ddfeffe392..7a74b18b8f 100644 --- a/tests/app/Census/CensusOfEngland1911Test.php +++ b/tests/app/Census/CensusOfEngland1911Test.php @@ -19,79 +19,82 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland1911 */ -class CensusOfEngland1911Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1911 - */ - public function testPlaceAndDate() { - $census = new CensusOfEngland1911; +class CensusOfEngland1911Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1911 + */ + public function testPlaceAndDate() + { + $census = new CensusOfEngland1911; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('02 APR 1911', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('02 APR 1911', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1911 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfEngland1911; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland1911 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfEngland1911; + $columns = $census->columns(); - $this->assertCount(16, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenDied', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertCount(16, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenDied', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('AgeM', $columns[2]->abbreviation()); - $this->assertSame('AgeF', $columns[3]->abbreviation()); - $this->assertSame('Condition', $columns[4]->abbreviation()); - $this->assertSame('YrM', $columns[5]->abbreviation()); - $this->assertSame('ChA', $columns[6]->abbreviation()); - $this->assertSame('ChL', $columns[7]->abbreviation()); - $this->assertSame('ChD', $columns[8]->abbreviation()); - $this->assertSame('Occupation', $columns[9]->abbreviation()); - $this->assertSame('Ind', $columns[10]->abbreviation()); - $this->assertSame('Emp', $columns[11]->abbreviation()); - $this->assertSame('Home', $columns[12]->abbreviation()); - $this->assertSame('Birthplace', $columns[13]->abbreviation()); - $this->assertSame('Nat', $columns[14]->abbreviation()); - $this->assertSame('Infirm', $columns[15]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('AgeM', $columns[2]->abbreviation()); + $this->assertSame('AgeF', $columns[3]->abbreviation()); + $this->assertSame('Condition', $columns[4]->abbreviation()); + $this->assertSame('YrM', $columns[5]->abbreviation()); + $this->assertSame('ChA', $columns[6]->abbreviation()); + $this->assertSame('ChL', $columns[7]->abbreviation()); + $this->assertSame('ChD', $columns[8]->abbreviation()); + $this->assertSame('Occupation', $columns[9]->abbreviation()); + $this->assertSame('Ind', $columns[10]->abbreviation()); + $this->assertSame('Emp', $columns[11]->abbreviation()); + $this->assertSame('Home', $columns[12]->abbreviation()); + $this->assertSame('Birthplace', $columns[13]->abbreviation()); + $this->assertSame('Nat', $columns[14]->abbreviation()); + $this->assertSame('Infirm', $columns[15]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Age (males)', $columns[2]->title()); - $this->assertSame('Age (females)', $columns[3]->title()); - $this->assertSame('Condition', $columns[4]->title()); - $this->assertSame('Years married', $columns[5]->title()); - $this->assertSame('Children born alive', $columns[6]->title()); - $this->assertSame('Children who are still alive', $columns[7]->title()); - $this->assertSame('Children who have died', $columns[8]->title()); - $this->assertSame('Rank, profession or occupation', $columns[9]->title()); - $this->assertSame('Industry', $columns[10]->title()); - $this->assertSame('Employer, worker or own account', $columns[11]->title()); - $this->assertSame('Working at home', $columns[12]->title()); - $this->assertSame('Where born', $columns[13]->title()); - $this->assertSame('Nationality', $columns[14]->title()); - $this->assertSame('Infirmity', $columns[15]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Age (males)', $columns[2]->title()); + $this->assertSame('Age (females)', $columns[3]->title()); + $this->assertSame('Condition', $columns[4]->title()); + $this->assertSame('Years married', $columns[5]->title()); + $this->assertSame('Children born alive', $columns[6]->title()); + $this->assertSame('Children who are still alive', $columns[7]->title()); + $this->assertSame('Children who have died', $columns[8]->title()); + $this->assertSame('Rank, profession or occupation', $columns[9]->title()); + $this->assertSame('Industry', $columns[10]->title()); + $this->assertSame('Employer, worker or own account', $columns[11]->title()); + $this->assertSame('Working at home', $columns[12]->title()); + $this->assertSame('Where born', $columns[13]->title()); + $this->assertSame('Nationality', $columns[14]->title()); + $this->assertSame('Infirmity', $columns[15]->title()); + } } diff --git a/tests/app/Census/CensusOfEnglandTest.php b/tests/app/Census/CensusOfEnglandTest.php index 748201509d..9a2441c3d2 100644 --- a/tests/app/Census/CensusOfEnglandTest.php +++ b/tests/app/Census/CensusOfEnglandTest.php @@ -19,37 +19,40 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfEngland */ -class CensusOfEnglandTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland - */ - public function testPlace() { - $census = new CensusOfEngland; +class CensusOfEnglandTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland + */ + public function testPlace() + { + $census = new CensusOfEngland; - $this->assertSame('England', $census->censusPlace()); - } + $this->assertSame('England', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfEngland - */ - public function testAllDates() { - $census = new CensusOfEngland; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfEngland + */ + public function testAllDates() + { + $census = new CensusOfEngland; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(9, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1841', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1851', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1861', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1871', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1881', $census_dates[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1891', $census_dates[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1901', $census_dates[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1911', $census_dates[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\RegisterOfEngland1939', $census_dates[8]); - } + $this->assertCount(9, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1841', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1851', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1861', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1871', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1881', $census_dates[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1891', $census_dates[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1901', $census_dates[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland1911', $census_dates[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\RegisterOfEngland1939', $census_dates[8]); + } } diff --git a/tests/app/Census/CensusOfFrance1831Test.php b/tests/app/Census/CensusOfFrance1831Test.php index 37a1f816a4..bde8ed0414 100644 --- a/tests/app/Census/CensusOfFrance1831Test.php +++ b/tests/app/Census/CensusOfFrance1831Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1836 */ -class CensusOfFrance1831Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1831 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1831; +class CensusOfFrance1831Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1831 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1831; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('20 JAN 1831', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('20 JAN 1831', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1831 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1831; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1831 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1831; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1836Test.php b/tests/app/Census/CensusOfFrance1836Test.php index b35774191b..61e96a55c0 100644 --- a/tests/app/Census/CensusOfFrance1836Test.php +++ b/tests/app/Census/CensusOfFrance1836Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1836 */ -class CensusOfFrance1836Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1836 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1836; +class CensusOfFrance1836Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1836 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1836; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('21 JAN 1836', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('21 JAN 1836', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1836 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1836; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1836 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1836; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1841Test.php b/tests/app/Census/CensusOfFrance1841Test.php index 52bb65efef..94329939bb 100644 --- a/tests/app/Census/CensusOfFrance1841Test.php +++ b/tests/app/Census/CensusOfFrance1841Test.php @@ -19,58 +19,61 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1841 */ -class CensusOfFrance1841Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1841 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1841; +class CensusOfFrance1841Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1841 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1841; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('21 JAN 1841', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('21 JAN 1841', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1841 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1841; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1841 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1841; + $columns = $census->columns(); - $this->assertCount(9, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertCount(9, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1846Test.php b/tests/app/Census/CensusOfFrance1846Test.php index 631bb65e7c..2914b9250e 100644 --- a/tests/app/Census/CensusOfFrance1846Test.php +++ b/tests/app/Census/CensusOfFrance1846Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1846 */ -class CensusOfFrance1846Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1846 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1846; +class CensusOfFrance1846Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1846 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1846; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('15 JAN 1846', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('15 JAN 1846', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1846 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1846; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1846 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1846; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1851Test.php b/tests/app/Census/CensusOfFrance1851Test.php index 4c2f807539..57fe306759 100644 --- a/tests/app/Census/CensusOfFrance1851Test.php +++ b/tests/app/Census/CensusOfFrance1851Test.php @@ -19,69 +19,72 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1851 */ -class CensusOfFrance1851Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1851 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1851; +class CensusOfFrance1851Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1851 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1851; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('16 JAN 1851', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('16 JAN 1851', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1851 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1851; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1851 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1851; + $columns = $census->columns(); - $this->assertCount(13, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertCount(13, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Professions', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Fr', $columns[10]->abbreviation()); - $this->assertSame('Nat', $columns[11]->abbreviation()); - $this->assertSame('Etr', $columns[12]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Professions', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Fr', $columns[10]->abbreviation()); + $this->assertSame('Nat', $columns[11]->abbreviation()); + $this->assertSame('Etr', $columns[12]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('Français d’origine', $columns[10]->title()); - $this->assertSame('Naturalisés français', $columns[11]->title()); - $this->assertSame('Étrangers (indiquer leur pays d’origine)', $columns[12]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('Français d’origine', $columns[10]->title()); + $this->assertSame('Naturalisés français', $columns[11]->title()); + $this->assertSame('Étrangers (indiquer leur pays d’origine)', $columns[12]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1856Test.php b/tests/app/Census/CensusOfFrance1856Test.php index e4438e5a4f..a7807c4346 100644 --- a/tests/app/Census/CensusOfFrance1856Test.php +++ b/tests/app/Census/CensusOfFrance1856Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1856 */ -class CensusOfFrance1856Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1856 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1856; +class CensusOfFrance1856Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1856 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1856; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('17 JAN 1856', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('17 JAN 1856', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1856 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1856; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1856 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1856; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1861Test.php b/tests/app/Census/CensusOfFrance1861Test.php index 59cd9eba4a..50b44a597c 100644 --- a/tests/app/Census/CensusOfFrance1861Test.php +++ b/tests/app/Census/CensusOfFrance1861Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1861 */ -class CensusOfFrance1861Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1861 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1861; +class CensusOfFrance1861Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1861 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1861; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('17 JAN 1861', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('17 JAN 1861', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1861 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1861; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1861 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1861; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1866Test.php b/tests/app/Census/CensusOfFrance1866Test.php index ff2022b13d..1e4aee946f 100644 --- a/tests/app/Census/CensusOfFrance1866Test.php +++ b/tests/app/Census/CensusOfFrance1866Test.php @@ -19,61 +19,64 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1866 */ -class CensusOfFrance1866Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1866 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1866; +class CensusOfFrance1866Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1866 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1866; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('18 JAN 1866', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('18 JAN 1866', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1866 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1866; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1866 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1866; + $columns = $census->columns(); - $this->assertCount(10, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertCount(10, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1872Test.php b/tests/app/Census/CensusOfFrance1872Test.php index da1a09ebca..795ed7e040 100644 --- a/tests/app/Census/CensusOfFrance1872Test.php +++ b/tests/app/Census/CensusOfFrance1872Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1872 */ -class CensusOfFrance1872Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1872 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1872; +class CensusOfFrance1872Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1872 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1872; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('18 JAN 1872', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('18 JAN 1872', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1872 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1872; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1872 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1872; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[10]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Nationalité', $columns[10]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Nationalité', $columns[10]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('Nationalité - Lieu de naissance', $columns[10]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('Nationalité - Lieu de naissance', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1876Test.php b/tests/app/Census/CensusOfFrance1876Test.php index 64ed3f29d8..9d43e33800 100644 --- a/tests/app/Census/CensusOfFrance1876Test.php +++ b/tests/app/Census/CensusOfFrance1876Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1876 */ -class CensusOfFrance1876Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1876 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1876; +class CensusOfFrance1876Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1876 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1876; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('20 JAN 1876', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('20 JAN 1876', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1876 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1876; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1876 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1876; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchGarcon', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchHomme', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuf', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFille', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchFemme', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionFrenchVeuve', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[10]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Titres', $columns[2]->abbreviation()); - $this->assertSame('Garçons', $columns[3]->abbreviation()); - $this->assertSame('Hommes', $columns[4]->abbreviation()); - $this->assertSame('Veufs', $columns[5]->abbreviation()); - $this->assertSame('Filles', $columns[6]->abbreviation()); - $this->assertSame('Femmes', $columns[7]->abbreviation()); - $this->assertSame('Veuves', $columns[8]->abbreviation()); - $this->assertSame('Âge', $columns[9]->abbreviation()); - $this->assertSame('Nationalité', $columns[10]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Titres', $columns[2]->abbreviation()); + $this->assertSame('Garçons', $columns[3]->abbreviation()); + $this->assertSame('Hommes', $columns[4]->abbreviation()); + $this->assertSame('Veufs', $columns[5]->abbreviation()); + $this->assertSame('Filles', $columns[6]->abbreviation()); + $this->assertSame('Femmes', $columns[7]->abbreviation()); + $this->assertSame('Veuves', $columns[8]->abbreviation()); + $this->assertSame('Âge', $columns[9]->abbreviation()); + $this->assertSame('Nationalité', $columns[10]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Hommes mariés', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('Femmes mariées', $columns[7]->title()); - $this->assertSame('', $columns[8]->title()); - $this->assertSame('', $columns[9]->title()); - $this->assertSame('Nationalité - Lieu de naissance', $columns[10]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Titres, qualifications, état ou profession et fonctions', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Hommes mariés', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('Femmes mariées', $columns[7]->title()); + $this->assertSame('', $columns[8]->title()); + $this->assertSame('', $columns[9]->title()); + $this->assertSame('Nationalité - Lieu de naissance', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1881Test.php b/tests/app/Census/CensusOfFrance1881Test.php index 36f6820ca8..efe5b1cdf4 100644 --- a/tests/app/Census/CensusOfFrance1881Test.php +++ b/tests/app/Census/CensusOfFrance1881Test.php @@ -19,46 +19,49 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1881 */ -class CensusOfFrance1881Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1881 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1881; +class CensusOfFrance1881Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1881 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1881; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('20 JAN 1881', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('20 JAN 1881', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1881 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1881; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1881 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1881; + $columns = $census->columns(); - $this->assertCount(5, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); + $this->assertCount(5, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Âge', $columns[2]->abbreviation()); - $this->assertSame('Profession', $columns[3]->abbreviation()); - $this->assertSame('Position', $columns[4]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Âge', $columns[2]->abbreviation()); + $this->assertSame('Profession', $columns[3]->abbreviation()); + $this->assertSame('Position', $columns[4]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Position dans le ménage', $columns[4]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Position dans le ménage', $columns[4]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1886Test.php b/tests/app/Census/CensusOfFrance1886Test.php index 370f5a5b2d..a2b1369bf3 100644 --- a/tests/app/Census/CensusOfFrance1886Test.php +++ b/tests/app/Census/CensusOfFrance1886Test.php @@ -19,49 +19,52 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1886 */ -class CensusOfFrance1886Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1886 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1886; +class CensusOfFrance1886Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1886 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1886; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('21 JAN 1886', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('21 JAN 1886', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1886 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1886; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1886 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1886; + $columns = $census->columns(); - $this->assertCount(6, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertCount(6, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Âge', $columns[2]->abbreviation()); - $this->assertSame('Nationalité', $columns[3]->abbreviation()); - $this->assertSame('Profession', $columns[4]->abbreviation()); - $this->assertSame('Position', $columns[5]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Âge', $columns[2]->abbreviation()); + $this->assertSame('Nationalité', $columns[3]->abbreviation()); + $this->assertSame('Profession', $columns[4]->abbreviation()); + $this->assertSame('Position', $columns[5]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Position dans le ménage', $columns[5]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Position dans le ménage', $columns[5]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1891Test.php b/tests/app/Census/CensusOfFrance1891Test.php index 44da0d9815..6500618c59 100644 --- a/tests/app/Census/CensusOfFrance1891Test.php +++ b/tests/app/Census/CensusOfFrance1891Test.php @@ -19,49 +19,52 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1891 */ -class CensusOfFrance1891Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1891 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1891; +class CensusOfFrance1891Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1891 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1891; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('15 JAN 1891', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('15 JAN 1891', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1891 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1891; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1891 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1891; + $columns = $census->columns(); - $this->assertCount(6, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertCount(6, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Âge', $columns[2]->abbreviation()); - $this->assertSame('Nationalité', $columns[3]->abbreviation()); - $this->assertSame('Profession', $columns[4]->abbreviation()); - $this->assertSame('Position', $columns[5]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Âge', $columns[2]->abbreviation()); + $this->assertSame('Nationalité', $columns[3]->abbreviation()); + $this->assertSame('Profession', $columns[4]->abbreviation()); + $this->assertSame('Position', $columns[5]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Position dans le ménage', $columns[5]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Position dans le ménage', $columns[5]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1896Test.php b/tests/app/Census/CensusOfFrance1896Test.php index 4410b17eba..0bd094d034 100644 --- a/tests/app/Census/CensusOfFrance1896Test.php +++ b/tests/app/Census/CensusOfFrance1896Test.php @@ -19,49 +19,52 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1896 */ -class CensusOfFrance1896Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1896 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1896; +class CensusOfFrance1896Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1896 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1896; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('16 JAN 1896', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('16 JAN 1896', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1896 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1896; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1896 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1896; + $columns = $census->columns(); - $this->assertCount(6, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertCount(6, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Âge', $columns[2]->abbreviation()); - $this->assertSame('Nationalité', $columns[3]->abbreviation()); - $this->assertSame('Profession', $columns[4]->abbreviation()); - $this->assertSame('Position', $columns[5]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Âge', $columns[2]->abbreviation()); + $this->assertSame('Nationalité', $columns[3]->abbreviation()); + $this->assertSame('Profession', $columns[4]->abbreviation()); + $this->assertSame('Position', $columns[5]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Position dans le ménage', $columns[5]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Position dans le ménage', $columns[5]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1901Test.php b/tests/app/Census/CensusOfFrance1901Test.php index 96d69058ae..c06e1dd224 100644 --- a/tests/app/Census/CensusOfFrance1901Test.php +++ b/tests/app/Census/CensusOfFrance1901Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1901 */ -class CensusOfFrance1901Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1901 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1901; +class CensusOfFrance1901Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1901 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1901; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('17 JAN 1901', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('17 JAN 1901', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1901 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1901; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1901 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1901; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Âge', $columns[2]->abbreviation()); - $this->assertSame('Nationalité', $columns[3]->abbreviation()); - $this->assertSame('Situation', $columns[4]->abbreviation()); - $this->assertSame('Profession', $columns[5]->abbreviation()); - $this->assertSame('Lieu', $columns[6]->abbreviation()); - $this->assertSame('Empl', $columns[7]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Âge', $columns[2]->abbreviation()); + $this->assertSame('Nationalité', $columns[3]->abbreviation()); + $this->assertSame('Situation', $columns[4]->abbreviation()); + $this->assertSame('Profession', $columns[5]->abbreviation()); + $this->assertSame('Lieu', $columns[6]->abbreviation()); + $this->assertSame('Empl', $columns[7]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('', $columns[2]->title()); - $this->assertSame('', $columns[3]->title()); - $this->assertSame('Situation par rapport au chef de ménage', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - $this->assertSame('Lieu de naissance', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('', $columns[2]->title()); + $this->assertSame('', $columns[3]->title()); + $this->assertSame('Situation par rapport au chef de ménage', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + $this->assertSame('Lieu de naissance', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1906Test.php b/tests/app/Census/CensusOfFrance1906Test.php index 400596aa6a..b06fe0c078 100644 --- a/tests/app/Census/CensusOfFrance1906Test.php +++ b/tests/app/Census/CensusOfFrance1906Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1906 */ -class CensusOfFrance1906Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1906 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1906; +class CensusOfFrance1906Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1906 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1906; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('18 JAN 1906', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('18 JAN 1906', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1906 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1906; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1906 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1906; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Année', $columns[2]->abbreviation()); - $this->assertSame('Lieu', $columns[3]->abbreviation()); - $this->assertSame('Nationalité', $columns[4]->abbreviation()); - $this->assertSame('Situation', $columns[5]->abbreviation()); - $this->assertSame('Profession', $columns[6]->abbreviation()); - $this->assertSame('Empl', $columns[7]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Année', $columns[2]->abbreviation()); + $this->assertSame('Lieu', $columns[3]->abbreviation()); + $this->assertSame('Nationalité', $columns[4]->abbreviation()); + $this->assertSame('Situation', $columns[5]->abbreviation()); + $this->assertSame('Profession', $columns[6]->abbreviation()); + $this->assertSame('Empl', $columns[7]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Année de naissance', $columns[2]->title()); - $this->assertSame('Lieu de naissance', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Année de naissance', $columns[2]->title()); + $this->assertSame('Lieu de naissance', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1911Test.php b/tests/app/Census/CensusOfFrance1911Test.php index ddf5e14ec6..833e56eb93 100644 --- a/tests/app/Census/CensusOfFrance1911Test.php +++ b/tests/app/Census/CensusOfFrance1911Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1911 */ -class CensusOfFrance1911Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1911 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1911; +class CensusOfFrance1911Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1911 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1911; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('19 JAN 1911', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('19 JAN 1911', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1911 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1911; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1911 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1911; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Année', $columns[2]->abbreviation()); - $this->assertSame('Lieu', $columns[3]->abbreviation()); - $this->assertSame('Nationalité', $columns[4]->abbreviation()); - $this->assertSame('Situation', $columns[5]->abbreviation()); - $this->assertSame('Profession', $columns[6]->abbreviation()); - $this->assertSame('Empl', $columns[7]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Année', $columns[2]->abbreviation()); + $this->assertSame('Lieu', $columns[3]->abbreviation()); + $this->assertSame('Nationalité', $columns[4]->abbreviation()); + $this->assertSame('Situation', $columns[5]->abbreviation()); + $this->assertSame('Profession', $columns[6]->abbreviation()); + $this->assertSame('Empl', $columns[7]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Année de naissance', $columns[2]->title()); - $this->assertSame('Lieu de naissance', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Année de naissance', $columns[2]->title()); + $this->assertSame('Lieu de naissance', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1921Test.php b/tests/app/Census/CensusOfFrance1921Test.php index 60969c118d..14eea00419 100644 --- a/tests/app/Census/CensusOfFrance1921Test.php +++ b/tests/app/Census/CensusOfFrance1921Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1921 */ -class CensusOfFrance1921Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1921 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1921; +class CensusOfFrance1921Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1921 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1921; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('20 JAN 1921', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('20 JAN 1921', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1921 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1921; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1921 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1921; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Année', $columns[2]->abbreviation()); - $this->assertSame('Lieu', $columns[3]->abbreviation()); - $this->assertSame('Nationalité', $columns[4]->abbreviation()); - $this->assertSame('Situation', $columns[5]->abbreviation()); - $this->assertSame('Profession', $columns[6]->abbreviation()); - $this->assertSame('Empl', $columns[7]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Année', $columns[2]->abbreviation()); + $this->assertSame('Lieu', $columns[3]->abbreviation()); + $this->assertSame('Nationalité', $columns[4]->abbreviation()); + $this->assertSame('Situation', $columns[5]->abbreviation()); + $this->assertSame('Profession', $columns[6]->abbreviation()); + $this->assertSame('Empl', $columns[7]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Année de naissance', $columns[2]->title()); - $this->assertSame('Lieu de naissance', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Année de naissance', $columns[2]->title()); + $this->assertSame('Lieu de naissance', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1926Test.php b/tests/app/Census/CensusOfFrance1926Test.php index 3f642ad745..734d4cd78d 100644 --- a/tests/app/Census/CensusOfFrance1926Test.php +++ b/tests/app/Census/CensusOfFrance1926Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1926 */ -class CensusOfFrance1926Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1926 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1926; +class CensusOfFrance1926Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1926 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1926; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('21 JAN 1926', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('21 JAN 1926', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1926 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1926; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1926 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1926; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Année', $columns[2]->abbreviation()); - $this->assertSame('Lieu', $columns[3]->abbreviation()); - $this->assertSame('Nationalité', $columns[4]->abbreviation()); - $this->assertSame('Situation', $columns[5]->abbreviation()); - $this->assertSame('Profession', $columns[6]->abbreviation()); - $this->assertSame('Empl', $columns[7]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Année', $columns[2]->abbreviation()); + $this->assertSame('Lieu', $columns[3]->abbreviation()); + $this->assertSame('Nationalité', $columns[4]->abbreviation()); + $this->assertSame('Situation', $columns[5]->abbreviation()); + $this->assertSame('Profession', $columns[6]->abbreviation()); + $this->assertSame('Empl', $columns[7]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Année de naissance', $columns[2]->title()); - $this->assertSame('Lieu de naissance', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Année de naissance', $columns[2]->title()); + $this->assertSame('Lieu de naissance', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1931Test.php b/tests/app/Census/CensusOfFrance1931Test.php index 1111802a6c..fd0a59b44b 100644 --- a/tests/app/Census/CensusOfFrance1931Test.php +++ b/tests/app/Census/CensusOfFrance1931Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1931 */ -class CensusOfFrance1931Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1931 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1931; +class CensusOfFrance1931Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1931 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1931; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('15 JAN 1931', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('15 JAN 1931', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1931 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1931; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1931 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1931; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Année', $columns[2]->abbreviation()); - $this->assertSame('Lieu', $columns[3]->abbreviation()); - $this->assertSame('Nationalité', $columns[4]->abbreviation()); - $this->assertSame('Situation', $columns[5]->abbreviation()); - $this->assertSame('Profession', $columns[6]->abbreviation()); - $this->assertSame('Empl', $columns[7]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Année', $columns[2]->abbreviation()); + $this->assertSame('Lieu', $columns[3]->abbreviation()); + $this->assertSame('Nationalité', $columns[4]->abbreviation()); + $this->assertSame('Situation', $columns[5]->abbreviation()); + $this->assertSame('Profession', $columns[6]->abbreviation()); + $this->assertSame('Empl', $columns[7]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Année de naissance', $columns[2]->title()); - $this->assertSame('Lieu de naissance', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Année de naissance', $columns[2]->title()); + $this->assertSame('Lieu de naissance', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1936Test.php b/tests/app/Census/CensusOfFrance1936Test.php index 0bbc0aef7e..c0fc1de754 100644 --- a/tests/app/Census/CensusOfFrance1936Test.php +++ b/tests/app/Census/CensusOfFrance1936Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1936 */ -class CensusOfFrance1936Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1936 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1936; +class CensusOfFrance1936Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1936 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1936; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('16 JAN 1936', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('16 JAN 1936', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1936 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1936; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1936 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1936; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Noms', $columns[0]->abbreviation()); - $this->assertSame('Prénoms', $columns[1]->abbreviation()); - $this->assertSame('Année', $columns[2]->abbreviation()); - $this->assertSame('Lieu', $columns[3]->abbreviation()); - $this->assertSame('Nationalité', $columns[4]->abbreviation()); - $this->assertSame('Situation', $columns[5]->abbreviation()); - $this->assertSame('Profession', $columns[6]->abbreviation()); - $this->assertSame('Empl', $columns[7]->abbreviation()); + $this->assertSame('Noms', $columns[0]->abbreviation()); + $this->assertSame('Prénoms', $columns[1]->abbreviation()); + $this->assertSame('Année', $columns[2]->abbreviation()); + $this->assertSame('Lieu', $columns[3]->abbreviation()); + $this->assertSame('Nationalité', $columns[4]->abbreviation()); + $this->assertSame('Situation', $columns[5]->abbreviation()); + $this->assertSame('Profession', $columns[6]->abbreviation()); + $this->assertSame('Empl', $columns[7]->abbreviation()); - $this->assertSame('Noms de famille', $columns[0]->title()); - $this->assertSame('', $columns[1]->title()); - $this->assertSame('Année de naissance', $columns[2]->title()); - $this->assertSame('Lieu de naissance', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); - $this->assertSame('', $columns[6]->title()); - $this->assertSame('', $columns[7]->title()); - } + $this->assertSame('Noms de famille', $columns[0]->title()); + $this->assertSame('', $columns[1]->title()); + $this->assertSame('Année de naissance', $columns[2]->title()); + $this->assertSame('Lieu de naissance', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('Situation par rapport au chef de ménage', $columns[5]->title()); + $this->assertSame('', $columns[6]->title()); + $this->assertSame('', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfFrance1946Test.php b/tests/app/Census/CensusOfFrance1946Test.php index 729ab16847..94a27ade78 100644 --- a/tests/app/Census/CensusOfFrance1946Test.php +++ b/tests/app/Census/CensusOfFrance1946Test.php @@ -19,49 +19,52 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance1946 */ -class CensusOfFrance1946Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1946 - */ - public function testPlaceAndDate() { - $census = new CensusOfFrance1946; +class CensusOfFrance1946Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1946 + */ + public function testPlaceAndDate() + { + $census = new CensusOfFrance1946; - $this->assertSame('France', $census->censusPlace()); - $this->assertSame('17 JAN 1946', $census->censusDate()); - } + $this->assertSame('France', $census->censusPlace()); + $this->assertSame('17 JAN 1946', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1946 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfFrance1946; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance1946 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfFrance1946; + $columns = $census->columns(); - $this->assertCount(6, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertCount(6, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNames', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertSame('Nom', $columns[0]->abbreviation()); - $this->assertSame('Prénom', $columns[1]->abbreviation()); - $this->assertSame('Parenté', $columns[2]->abbreviation()); - $this->assertSame('Année', $columns[3]->abbreviation()); - $this->assertSame('Nationalité', $columns[4]->abbreviation()); - $this->assertSame('Profession', $columns[5]->abbreviation()); + $this->assertSame('Nom', $columns[0]->abbreviation()); + $this->assertSame('Prénom', $columns[1]->abbreviation()); + $this->assertSame('Parenté', $columns[2]->abbreviation()); + $this->assertSame('Année', $columns[3]->abbreviation()); + $this->assertSame('Nationalité', $columns[4]->abbreviation()); + $this->assertSame('Profession', $columns[5]->abbreviation()); - $this->assertSame('Nom de famille', $columns[0]->title()); - $this->assertSame('Prénom usuel', $columns[1]->title()); - $this->assertSame('Parenté avec le chef de ménage ou situation dans le ménage', $columns[2]->title()); - $this->assertSame('Année de naissance', $columns[3]->title()); - $this->assertSame('', $columns[4]->title()); - $this->assertSame('', $columns[5]->title()); - } + $this->assertSame('Nom de famille', $columns[0]->title()); + $this->assertSame('Prénom usuel', $columns[1]->title()); + $this->assertSame('Parenté avec le chef de ménage ou situation dans le ménage', $columns[2]->title()); + $this->assertSame('Année de naissance', $columns[3]->title()); + $this->assertSame('', $columns[4]->title()); + $this->assertSame('', $columns[5]->title()); + } } diff --git a/tests/app/Census/CensusOfFranceTest.php b/tests/app/Census/CensusOfFranceTest.php index b93681163c..b7edd018dd 100644 --- a/tests/app/Census/CensusOfFranceTest.php +++ b/tests/app/Census/CensusOfFranceTest.php @@ -19,50 +19,53 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfFrance */ -class CensusOfFranceTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance - */ - public function testPlace() { - $census = new CensusOfFrance; +class CensusOfFranceTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance + */ + public function testPlace() + { + $census = new CensusOfFrance; - $this->assertSame('France', $census->censusPlace()); - } + $this->assertSame('France', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfFrance - */ - public function testAllDates() { - $census = new CensusOfFrance; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfFrance + */ + public function testAllDates() + { + $census = new CensusOfFrance; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(22, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1831', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1836', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1841', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1846', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1851', $census_dates[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1856', $census_dates[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1861', $census_dates[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1866', $census_dates[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1872', $census_dates[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1876', $census_dates[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1881', $census_dates[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1886', $census_dates[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1891', $census_dates[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1896', $census_dates[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1901', $census_dates[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1906', $census_dates[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1911', $census_dates[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1921', $census_dates[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1926', $census_dates[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1931', $census_dates[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1936', $census_dates[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1946', $census_dates[21]); - } + $this->assertCount(22, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1831', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1836', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1841', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1846', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1851', $census_dates[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1856', $census_dates[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1861', $census_dates[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1866', $census_dates[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1872', $census_dates[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1876', $census_dates[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1881', $census_dates[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1886', $census_dates[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1891', $census_dates[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1896', $census_dates[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1901', $census_dates[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1906', $census_dates[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1911', $census_dates[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1921', $census_dates[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1926', $census_dates[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1931', $census_dates[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1936', $census_dates[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance1946', $census_dates[21]); + } } diff --git a/tests/app/Census/CensusOfScotland1841Test.php b/tests/app/Census/CensusOfScotland1841Test.php index fe8df16dea..c297019635 100644 --- a/tests/app/Census/CensusOfScotland1841Test.php +++ b/tests/app/Census/CensusOfScotland1841Test.php @@ -19,49 +19,52 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1841 */ -class CensusOfScotland1841Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1841 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1841; +class CensusOfScotland1841Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1841 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1841; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('06 JUN 1841', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('06 JUN 1841', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1841 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1841; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1841 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1841; + $columns = $census->columns(); - $this->assertCount(6, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBornForeignParts', $columns[5]); + $this->assertCount(6, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBornForeignParts', $columns[5]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('AgeM', $columns[1]->abbreviation()); - $this->assertSame('AgeF', $columns[2]->abbreviation()); - $this->assertSame('Occupation', $columns[3]->abbreviation()); - $this->assertSame('BiC', $columns[4]->abbreviation()); - $this->assertSame('EIF', $columns[5]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('AgeM', $columns[1]->abbreviation()); + $this->assertSame('AgeF', $columns[2]->abbreviation()); + $this->assertSame('Occupation', $columns[3]->abbreviation()); + $this->assertSame('BiC', $columns[4]->abbreviation()); + $this->assertSame('EIF', $columns[5]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Age (males)', $columns[1]->title()); - $this->assertSame('Age (females)', $columns[2]->title()); - $this->assertSame('Profession, trade, employment or of independent means', $columns[3]->title()); - $this->assertSame('Born in same county', $columns[4]->title()); - $this->assertSame('Born in England, Ireland or foreign parts', $columns[5]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Age (males)', $columns[1]->title()); + $this->assertSame('Age (females)', $columns[2]->title()); + $this->assertSame('Profession, trade, employment or of independent means', $columns[3]->title()); + $this->assertSame('Born in same county', $columns[4]->title()); + $this->assertSame('Born in England, Ireland or foreign parts', $columns[5]->title()); + } } diff --git a/tests/app/Census/CensusOfScotland1851Test.php b/tests/app/Census/CensusOfScotland1851Test.php index c9f8a0b8fb..4447d841ac 100644 --- a/tests/app/Census/CensusOfScotland1851Test.php +++ b/tests/app/Census/CensusOfScotland1851Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1851 */ -class CensusOfScotland1851Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1851 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1851; +class CensusOfScotland1851Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1851 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1851; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('30 MAR 1851', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('30 MAR 1851', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1851 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1851; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1851 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1851; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfScotland1861Test.php b/tests/app/Census/CensusOfScotland1861Test.php index 7ee8d4bc70..ebfecd411d 100644 --- a/tests/app/Census/CensusOfScotland1861Test.php +++ b/tests/app/Census/CensusOfScotland1861Test.php @@ -19,58 +19,61 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1861 */ -class CensusOfScotland1861Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1861 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1861; +class CensusOfScotland1861Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1861 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1861; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('07 APR 1861', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('07 APR 1861', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1861 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1861; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1861 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1861; + $columns = $census->columns(); - $this->assertCount(9, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertCount(9, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('School', $columns[8]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('School', $columns[8]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); - $this->assertSame('Number of children between 5 and 13 attending school', $columns[8]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); + $this->assertSame('Number of children between 5 and 13 attending school', $columns[8]->title()); + } } diff --git a/tests/app/Census/CensusOfScotland1871Test.php b/tests/app/Census/CensusOfScotland1871Test.php index 2e1f5132f8..8fa000be4b 100644 --- a/tests/app/Census/CensusOfScotland1871Test.php +++ b/tests/app/Census/CensusOfScotland1871Test.php @@ -19,58 +19,61 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1871 */ -class CensusOfScotland1871Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1871 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1871; +class CensusOfScotland1871Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1871 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1871; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('02 APR 1871', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('02 APR 1871', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1871 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1871; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1871 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1871; + $columns = $census->columns(); - $this->assertCount(9, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertCount(9, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('School', $columns[8]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('School', $columns[8]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); - $this->assertSame('Number of children between 5 and 13 attending school or educated at home', $columns[8]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); + $this->assertSame('Number of children between 5 and 13 attending school or educated at home', $columns[8]->title()); + } } diff --git a/tests/app/Census/CensusOfScotland1881Test.php b/tests/app/Census/CensusOfScotland1881Test.php index 4023b1ecdb..072e4c5c16 100644 --- a/tests/app/Census/CensusOfScotland1881Test.php +++ b/tests/app/Census/CensusOfScotland1881Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1881 */ -class CensusOfScotland1881Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1881 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1881; +class CensusOfScotland1881Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1881 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1881; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('03 APR 1881', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('03 APR 1881', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1881 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1881; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1881 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1881; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfScotland1891Test.php b/tests/app/Census/CensusOfScotland1891Test.php index df8f433ccf..013867dfe7 100644 --- a/tests/app/Census/CensusOfScotland1891Test.php +++ b/tests/app/Census/CensusOfScotland1891Test.php @@ -19,67 +19,70 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1891 */ -class CensusOfScotland1891Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1891 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1891; +class CensusOfScotland1891Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1891 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1891; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('05 APR 1891', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('05 APR 1891', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1891 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1891; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1891 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1891; + $columns = $census->columns(); - $this->assertCount(12, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertCount(12, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Empl', $columns[6]->abbreviation()); - $this->assertSame('Empd', $columns[7]->abbreviation()); - $this->assertSame('OAC', $columns[8]->abbreviation()); - $this->assertSame('Birthplace', $columns[9]->abbreviation()); - $this->assertSame('Lang', $columns[10]->abbreviation()); - $this->assertSame('Infirm', $columns[11]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Empl', $columns[6]->abbreviation()); + $this->assertSame('Empd', $columns[7]->abbreviation()); + $this->assertSame('OAC', $columns[8]->abbreviation()); + $this->assertSame('Birthplace', $columns[9]->abbreviation()); + $this->assertSame('Lang', $columns[10]->abbreviation()); + $this->assertSame('Infirm', $columns[11]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Employer', $columns[6]->title()); - $this->assertSame('Employed', $columns[7]->title()); - $this->assertSame('Own account', $columns[8]->title()); - $this->assertSame('Where born', $columns[9]->title()); - $this->assertSame('Language spoken', $columns[10]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, lunatic or imbecile', $columns[11]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Employer', $columns[6]->title()); + $this->assertSame('Employed', $columns[7]->title()); + $this->assertSame('Own account', $columns[8]->title()); + $this->assertSame('Where born', $columns[9]->title()); + $this->assertSame('Language spoken', $columns[10]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, lunatic or imbecile', $columns[11]->title()); + } } diff --git a/tests/app/Census/CensusOfScotland1901Test.php b/tests/app/Census/CensusOfScotland1901Test.php index 25cab617ec..dd304165b7 100644 --- a/tests/app/Census/CensusOfScotland1901Test.php +++ b/tests/app/Census/CensusOfScotland1901Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1901 */ -class CensusOfScotland1901Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1901 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1901; +class CensusOfScotland1901Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1901 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1901; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('31 MAR 1901', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('31 MAR 1901', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1901 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1901; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1901 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1901; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Emp', $columns[6]->abbreviation()); - $this->assertSame('Home', $columns[7]->abbreviation()); - $this->assertSame('Birthplace', $columns[8]->abbreviation()); - $this->assertSame('Lang', $columns[9]->abbreviation()); - $this->assertSame('Infirm', $columns[10]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Emp', $columns[6]->abbreviation()); + $this->assertSame('Home', $columns[7]->abbreviation()); + $this->assertSame('Birthplace', $columns[8]->abbreviation()); + $this->assertSame('Lang', $columns[9]->abbreviation()); + $this->assertSame('Infirm', $columns[10]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Employer, worker or own account', $columns[6]->title()); - $this->assertSame('Working at home', $columns[7]->title()); - $this->assertSame('Where born', $columns[8]->title()); - $this->assertSame('Language spoken', $columns[9]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded', $columns[10]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Employer, worker or own account', $columns[6]->title()); + $this->assertSame('Working at home', $columns[7]->title()); + $this->assertSame('Where born', $columns[8]->title()); + $this->assertSame('Language spoken', $columns[9]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfScotland1911Test.php b/tests/app/Census/CensusOfScotland1911Test.php index e7d9dc8c09..5eeb5a816f 100644 --- a/tests/app/Census/CensusOfScotland1911Test.php +++ b/tests/app/Census/CensusOfScotland1911Test.php @@ -19,82 +19,85 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland1911 */ -class CensusOfScotland1911Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1911 - */ - public function testPlaceAndDate() { - $census = new CensusOfScotland1911; +class CensusOfScotland1911Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1911 + */ + public function testPlaceAndDate() + { + $census = new CensusOfScotland1911; - $this->assertSame('Scotland', $census->censusPlace()); - $this->assertSame('02 APR 1911', $census->censusDate()); - } + $this->assertSame('Scotland', $census->censusPlace()); + $this->assertSame('02 APR 1911', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1911 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfScotland1911; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland1911 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfScotland1911; + $columns = $census->columns(); - $this->assertCount(17, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenDied', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertCount(17, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenDied', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('AgeM', $columns[2]->abbreviation()); - $this->assertSame('AgeF', $columns[3]->abbreviation()); - $this->assertSame('Lang', $columns[4]->abbreviation()); - $this->assertSame('Condition', $columns[5]->abbreviation()); - $this->assertSame('YrM', $columns[6]->abbreviation()); - $this->assertSame('ChA', $columns[7]->abbreviation()); - $this->assertSame('ChL', $columns[8]->abbreviation()); - $this->assertSame('ChD', $columns[9]->abbreviation()); - $this->assertSame('Occupation', $columns[10]->abbreviation()); - $this->assertSame('Ind', $columns[11]->abbreviation()); - $this->assertSame('Emp', $columns[12]->abbreviation()); - $this->assertSame('Home', $columns[13]->abbreviation()); - $this->assertSame('Birthplace', $columns[14]->abbreviation()); - $this->assertSame('Nat', $columns[15]->abbreviation()); - $this->assertSame('Infirm', $columns[16]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('AgeM', $columns[2]->abbreviation()); + $this->assertSame('AgeF', $columns[3]->abbreviation()); + $this->assertSame('Lang', $columns[4]->abbreviation()); + $this->assertSame('Condition', $columns[5]->abbreviation()); + $this->assertSame('YrM', $columns[6]->abbreviation()); + $this->assertSame('ChA', $columns[7]->abbreviation()); + $this->assertSame('ChL', $columns[8]->abbreviation()); + $this->assertSame('ChD', $columns[9]->abbreviation()); + $this->assertSame('Occupation', $columns[10]->abbreviation()); + $this->assertSame('Ind', $columns[11]->abbreviation()); + $this->assertSame('Emp', $columns[12]->abbreviation()); + $this->assertSame('Home', $columns[13]->abbreviation()); + $this->assertSame('Birthplace', $columns[14]->abbreviation()); + $this->assertSame('Nat', $columns[15]->abbreviation()); + $this->assertSame('Infirm', $columns[16]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Age (males)', $columns[2]->title()); - $this->assertSame('Age (females)', $columns[3]->title()); - $this->assertSame('Language spoken', $columns[4]->title()); - $this->assertSame('Condition', $columns[5]->title()); - $this->assertSame('Years married', $columns[6]->title()); - $this->assertSame('Children born alive', $columns[7]->title()); - $this->assertSame('Children who are still alive', $columns[8]->title()); - $this->assertSame('Children who have died', $columns[9]->title()); - $this->assertSame('Rank, profession or occupation', $columns[10]->title()); - $this->assertSame('Industry', $columns[11]->title()); - $this->assertSame('Employer, worker or own account', $columns[12]->title()); - $this->assertSame('Working at home', $columns[13]->title()); - $this->assertSame('Where born', $columns[14]->title()); - $this->assertSame('Nationality', $columns[15]->title()); - $this->assertSame('Infirmity', $columns[16]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Age (males)', $columns[2]->title()); + $this->assertSame('Age (females)', $columns[3]->title()); + $this->assertSame('Language spoken', $columns[4]->title()); + $this->assertSame('Condition', $columns[5]->title()); + $this->assertSame('Years married', $columns[6]->title()); + $this->assertSame('Children born alive', $columns[7]->title()); + $this->assertSame('Children who are still alive', $columns[8]->title()); + $this->assertSame('Children who have died', $columns[9]->title()); + $this->assertSame('Rank, profession or occupation', $columns[10]->title()); + $this->assertSame('Industry', $columns[11]->title()); + $this->assertSame('Employer, worker or own account', $columns[12]->title()); + $this->assertSame('Working at home', $columns[13]->title()); + $this->assertSame('Where born', $columns[14]->title()); + $this->assertSame('Nationality', $columns[15]->title()); + $this->assertSame('Infirmity', $columns[16]->title()); + } } diff --git a/tests/app/Census/CensusOfScotlandTest.php b/tests/app/Census/CensusOfScotlandTest.php index 54097ff004..43be1c93d8 100644 --- a/tests/app/Census/CensusOfScotlandTest.php +++ b/tests/app/Census/CensusOfScotlandTest.php @@ -19,36 +19,39 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfScotland */ -class CensusOfScotlandTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland - */ - public function testPlace() { - $census = new CensusOfScotland; +class CensusOfScotlandTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland + */ + public function testPlace() + { + $census = new CensusOfScotland; - $this->assertSame('Scotland', $census->censusPlace()); - } + $this->assertSame('Scotland', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfScotland - */ - public function testAllDates() { - $census = new CensusOfScotland; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfScotland + */ + public function testAllDates() + { + $census = new CensusOfScotland; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(8, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1841', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1851', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1861', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1871', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1881', $census_dates[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1891', $census_dates[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1901', $census_dates[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1911', $census_dates[7]); - } + $this->assertCount(8, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1841', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1851', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1861', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1871', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1881', $census_dates[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1891', $census_dates[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1901', $census_dates[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland1911', $census_dates[7]); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1790Test.php b/tests/app/Census/CensusOfUnitedStates1790Test.php index f4563fecc0..6650d320a2 100644 --- a/tests/app/Census/CensusOfUnitedStates1790Test.php +++ b/tests/app/Census/CensusOfUnitedStates1790Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1790 */ -class CensusOfUnitedStates1790Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1790 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1790; +class CensusOfUnitedStates1790Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1790 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1790; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('02 AUG 1790', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('02 AUG 1790', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1790 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1790; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1790 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1790; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Occupation', $columns[1]->abbreviation()); - $this->assertSame('White male 16+', $columns[2]->abbreviation()); - $this->assertSame('White male 0-16', $columns[3]->abbreviation()); - $this->assertSame('White female', $columns[4]->abbreviation()); - $this->assertSame('Free', $columns[5]->abbreviation()); - $this->assertSame('Slaves', $columns[6]->abbreviation()); - $this->assertSame('Total', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Occupation', $columns[1]->abbreviation()); + $this->assertSame('White male 16+', $columns[2]->abbreviation()); + $this->assertSame('White male 0-16', $columns[3]->abbreviation()); + $this->assertSame('White female', $columns[4]->abbreviation()); + $this->assertSame('Free', $columns[5]->abbreviation()); + $this->assertSame('Slaves', $columns[6]->abbreviation()); + $this->assertSame('Total', $columns[7]->abbreviation()); - $this->assertSame('Name of head of family', $columns[0]->title()); - $this->assertSame('Professions and occupation', $columns[1]->title()); - $this->assertSame('White male of 16 yrs upward', $columns[2]->title()); - $this->assertSame('White males of under 16 yrs', $columns[3]->title()); - $this->assertSame('All White Females', $columns[4]->title()); - $this->assertSame('All other free persons', $columns[5]->title()); - $this->assertSame('Number of slaves', $columns[6]->title()); - $this->assertSame('Total', $columns[7]->title()); - } + $this->assertSame('Name of head of family', $columns[0]->title()); + $this->assertSame('Professions and occupation', $columns[1]->title()); + $this->assertSame('White male of 16 yrs upward', $columns[2]->title()); + $this->assertSame('White males of under 16 yrs', $columns[3]->title()); + $this->assertSame('All White Females', $columns[4]->title()); + $this->assertSame('All other free persons', $columns[5]->title()); + $this->assertSame('Number of slaves', $columns[6]->title()); + $this->assertSame('Total', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1800Test.php b/tests/app/Census/CensusOfUnitedStates1800Test.php index 237ff843dc..2002c0667c 100644 --- a/tests/app/Census/CensusOfUnitedStates1800Test.php +++ b/tests/app/Census/CensusOfUnitedStates1800Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1800 */ -class CensusOfUnitedStates1800Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1800 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1800; +class CensusOfUnitedStates1800Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1800 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1800; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('04 AUG 1800', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('04 AUG 1800', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1800 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1800; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1800 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1800; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('M0-10', $columns[1]->abbreviation()); - $this->assertSame('M10-16', $columns[2]->abbreviation()); - $this->assertSame('M16-26', $columns[3]->abbreviation()); - $this->assertSame('M26-45', $columns[4]->abbreviation()); - $this->assertSame('M45+', $columns[5]->abbreviation()); - $this->assertSame('F0-10', $columns[6]->abbreviation()); - $this->assertSame('F10-16', $columns[7]->abbreviation()); - $this->assertSame('F16-26', $columns[8]->abbreviation()); - $this->assertSame('F26-45', $columns[9]->abbreviation()); - $this->assertSame('F45+', $columns[10]->abbreviation()); - $this->assertSame('Free', $columns[11]->abbreviation()); - $this->assertSame('Slaves', $columns[12]->abbreviation()); - $this->assertSame('Total', $columns[13]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('M0-10', $columns[1]->abbreviation()); + $this->assertSame('M10-16', $columns[2]->abbreviation()); + $this->assertSame('M16-26', $columns[3]->abbreviation()); + $this->assertSame('M26-45', $columns[4]->abbreviation()); + $this->assertSame('M45+', $columns[5]->abbreviation()); + $this->assertSame('F0-10', $columns[6]->abbreviation()); + $this->assertSame('F10-16', $columns[7]->abbreviation()); + $this->assertSame('F16-26', $columns[8]->abbreviation()); + $this->assertSame('F26-45', $columns[9]->abbreviation()); + $this->assertSame('F45+', $columns[10]->abbreviation()); + $this->assertSame('Free', $columns[11]->abbreviation()); + $this->assertSame('Slaves', $columns[12]->abbreviation()); + $this->assertSame('Total', $columns[13]->abbreviation()); - $this->assertSame('Name of head of family', $columns[0]->title()); - $this->assertSame('Free white males 0-10 years', $columns[1]->title()); - $this->assertSame('Free white males 10-16 years', $columns[2]->title()); - $this->assertSame('Free white males 16-26 years', $columns[3]->title()); - $this->assertSame('Free white males 26-45 years', $columns[4]->title()); - $this->assertSame('Free white males 45+ years', $columns[5]->title()); - $this->assertSame('Free white females 0-10 years', $columns[6]->title()); - $this->assertSame('Free white females 10-16 years', $columns[7]->title()); - $this->assertSame('Free white females 16-26 years', $columns[8]->title()); - $this->assertSame('Free white females 26-45 years', $columns[9]->title()); - $this->assertSame('Free white females 45+ years', $columns[10]->title()); - $this->assertSame('All other free persons, except Indians not taxed', $columns[11]->title()); - $this->assertSame('Number of slaves', $columns[12]->title()); - $this->assertSame('Total number of individuals', $columns[13]->title()); - } + $this->assertSame('Name of head of family', $columns[0]->title()); + $this->assertSame('Free white males 0-10 years', $columns[1]->title()); + $this->assertSame('Free white males 10-16 years', $columns[2]->title()); + $this->assertSame('Free white males 16-26 years', $columns[3]->title()); + $this->assertSame('Free white males 26-45 years', $columns[4]->title()); + $this->assertSame('Free white males 45+ years', $columns[5]->title()); + $this->assertSame('Free white females 0-10 years', $columns[6]->title()); + $this->assertSame('Free white females 10-16 years', $columns[7]->title()); + $this->assertSame('Free white females 16-26 years', $columns[8]->title()); + $this->assertSame('Free white females 26-45 years', $columns[9]->title()); + $this->assertSame('Free white females 45+ years', $columns[10]->title()); + $this->assertSame('All other free persons, except Indians not taxed', $columns[11]->title()); + $this->assertSame('Number of slaves', $columns[12]->title()); + $this->assertSame('Total number of individuals', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1810Test.php b/tests/app/Census/CensusOfUnitedStates1810Test.php index 0e8c549c8b..aed5e7ce22 100644 --- a/tests/app/Census/CensusOfUnitedStates1810Test.php +++ b/tests/app/Census/CensusOfUnitedStates1810Test.php @@ -19,73 +19,76 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1810 */ -class CensusOfUnitedStates1810Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1810 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1810; +class CensusOfUnitedStates1810Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1810 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1810; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('06 AUG 1810', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('06 AUG 1810', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1810 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1810; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1810 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1810; + $columns = $census->columns(); - $this->assertCount(14, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertCount(14, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('M0-10', $columns[1]->abbreviation()); - $this->assertSame('M10-16', $columns[2]->abbreviation()); - $this->assertSame('M16-26', $columns[3]->abbreviation()); - $this->assertSame('M26-45', $columns[4]->abbreviation()); - $this->assertSame('M45+', $columns[5]->abbreviation()); - $this->assertSame('F0-10', $columns[6]->abbreviation()); - $this->assertSame('F10-16', $columns[7]->abbreviation()); - $this->assertSame('F16-26', $columns[8]->abbreviation()); - $this->assertSame('F26-45', $columns[9]->abbreviation()); - $this->assertSame('F45+', $columns[10]->abbreviation()); - $this->assertSame('Free', $columns[11]->abbreviation()); - $this->assertSame('Slaves', $columns[12]->abbreviation()); - $this->assertSame('Total', $columns[13]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('M0-10', $columns[1]->abbreviation()); + $this->assertSame('M10-16', $columns[2]->abbreviation()); + $this->assertSame('M16-26', $columns[3]->abbreviation()); + $this->assertSame('M26-45', $columns[4]->abbreviation()); + $this->assertSame('M45+', $columns[5]->abbreviation()); + $this->assertSame('F0-10', $columns[6]->abbreviation()); + $this->assertSame('F10-16', $columns[7]->abbreviation()); + $this->assertSame('F16-26', $columns[8]->abbreviation()); + $this->assertSame('F26-45', $columns[9]->abbreviation()); + $this->assertSame('F45+', $columns[10]->abbreviation()); + $this->assertSame('Free', $columns[11]->abbreviation()); + $this->assertSame('Slaves', $columns[12]->abbreviation()); + $this->assertSame('Total', $columns[13]->abbreviation()); - $this->assertSame('Name of head of family', $columns[0]->title()); - $this->assertSame('Free white males 0-10 years', $columns[1]->title()); - $this->assertSame('Free white males 10-16 years', $columns[2]->title()); - $this->assertSame('Free white males 16-26 years', $columns[3]->title()); - $this->assertSame('Free white males 26-45 years', $columns[4]->title()); - $this->assertSame('Free white males 45+ years', $columns[5]->title()); - $this->assertSame('Free white females 0-10 years', $columns[6]->title()); - $this->assertSame('Free white females 10-16 years', $columns[7]->title()); - $this->assertSame('Free white females 16-26 years', $columns[8]->title()); - $this->assertSame('Free white females 26-45 years', $columns[9]->title()); - $this->assertSame('Free white females 45+ years', $columns[10]->title()); - $this->assertSame('All other free persons, except Indians not taxed', $columns[11]->title()); - $this->assertSame('Number of slaves', $columns[12]->title()); - $this->assertSame('Total number of individuals', $columns[13]->title()); - } + $this->assertSame('Name of head of family', $columns[0]->title()); + $this->assertSame('Free white males 0-10 years', $columns[1]->title()); + $this->assertSame('Free white males 10-16 years', $columns[2]->title()); + $this->assertSame('Free white males 16-26 years', $columns[3]->title()); + $this->assertSame('Free white males 26-45 years', $columns[4]->title()); + $this->assertSame('Free white males 45+ years', $columns[5]->title()); + $this->assertSame('Free white females 0-10 years', $columns[6]->title()); + $this->assertSame('Free white females 10-16 years', $columns[7]->title()); + $this->assertSame('Free white females 16-26 years', $columns[8]->title()); + $this->assertSame('Free white females 26-45 years', $columns[9]->title()); + $this->assertSame('Free white females 45+ years', $columns[10]->title()); + $this->assertSame('All other free persons, except Indians not taxed', $columns[11]->title()); + $this->assertSame('Number of slaves', $columns[12]->title()); + $this->assertSame('Total number of individuals', $columns[13]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1820Test.php b/tests/app/Census/CensusOfUnitedStates1820Test.php index db9b6f90d6..299f203843 100644 --- a/tests/app/Census/CensusOfUnitedStates1820Test.php +++ b/tests/app/Census/CensusOfUnitedStates1820Test.php @@ -19,127 +19,130 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1820 */ -class CensusOfUnitedStates1820Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1820 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1820; +class CensusOfUnitedStates1820Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1820 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1820; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('07 AUG 1820', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('07 AUG 1820', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1820 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1820; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1820 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1820; + $columns = $census->columns(); - $this->assertCount(32, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[29]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[30]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[31]); + $this->assertCount(32, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[29]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[30]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[31]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('M0-10', $columns[1]->abbreviation()); - $this->assertSame('M10-16', $columns[2]->abbreviation()); - $this->assertSame('M16-18', $columns[3]->abbreviation()); - $this->assertSame('M16-26', $columns[4]->abbreviation()); - $this->assertSame('M26-45', $columns[5]->abbreviation()); - $this->assertSame('M45+', $columns[6]->abbreviation()); - $this->assertSame('F0-10', $columns[7]->abbreviation()); - $this->assertSame('F10-16', $columns[8]->abbreviation()); - $this->assertSame('F16-26', $columns[9]->abbreviation()); - $this->assertSame('F26-45', $columns[10]->abbreviation()); - $this->assertSame('F45+', $columns[11]->abbreviation()); - $this->assertSame('FNR', $columns[12]->abbreviation()); - $this->assertSame('AG', $columns[13]->abbreviation()); - $this->assertSame('COM', $columns[14]->abbreviation()); - $this->assertSame('MNF', $columns[15]->abbreviation()); - $this->assertSame('M0', $columns[16]->abbreviation()); - $this->assertSame('M14', $columns[17]->abbreviation()); - $this->assertSame('M26', $columns[18]->abbreviation()); - $this->assertSame('M45', $columns[19]->abbreviation()); - $this->assertSame('F0', $columns[20]->abbreviation()); - $this->assertSame('F14', $columns[21]->abbreviation()); - $this->assertSame('F26', $columns[22]->abbreviation()); - $this->assertSame('F45', $columns[23]->abbreviation()); - $this->assertSame('M0', $columns[24]->abbreviation()); - $this->assertSame('M14', $columns[25]->abbreviation()); - $this->assertSame('M26', $columns[26]->abbreviation()); - $this->assertSame('M45', $columns[27]->abbreviation()); - $this->assertSame('F0', $columns[28]->abbreviation()); - $this->assertSame('F14', $columns[29]->abbreviation()); - $this->assertSame('F26', $columns[30]->abbreviation()); - $this->assertSame('F45', $columns[31]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('M0-10', $columns[1]->abbreviation()); + $this->assertSame('M10-16', $columns[2]->abbreviation()); + $this->assertSame('M16-18', $columns[3]->abbreviation()); + $this->assertSame('M16-26', $columns[4]->abbreviation()); + $this->assertSame('M26-45', $columns[5]->abbreviation()); + $this->assertSame('M45+', $columns[6]->abbreviation()); + $this->assertSame('F0-10', $columns[7]->abbreviation()); + $this->assertSame('F10-16', $columns[8]->abbreviation()); + $this->assertSame('F16-26', $columns[9]->abbreviation()); + $this->assertSame('F26-45', $columns[10]->abbreviation()); + $this->assertSame('F45+', $columns[11]->abbreviation()); + $this->assertSame('FNR', $columns[12]->abbreviation()); + $this->assertSame('AG', $columns[13]->abbreviation()); + $this->assertSame('COM', $columns[14]->abbreviation()); + $this->assertSame('MNF', $columns[15]->abbreviation()); + $this->assertSame('M0', $columns[16]->abbreviation()); + $this->assertSame('M14', $columns[17]->abbreviation()); + $this->assertSame('M26', $columns[18]->abbreviation()); + $this->assertSame('M45', $columns[19]->abbreviation()); + $this->assertSame('F0', $columns[20]->abbreviation()); + $this->assertSame('F14', $columns[21]->abbreviation()); + $this->assertSame('F26', $columns[22]->abbreviation()); + $this->assertSame('F45', $columns[23]->abbreviation()); + $this->assertSame('M0', $columns[24]->abbreviation()); + $this->assertSame('M14', $columns[25]->abbreviation()); + $this->assertSame('M26', $columns[26]->abbreviation()); + $this->assertSame('M45', $columns[27]->abbreviation()); + $this->assertSame('F0', $columns[28]->abbreviation()); + $this->assertSame('F14', $columns[29]->abbreviation()); + $this->assertSame('F26', $columns[30]->abbreviation()); + $this->assertSame('F45', $columns[31]->abbreviation()); - $this->assertSame('Name of head of family', $columns[0]->title()); - $this->assertSame('Free white males 0-10 years', $columns[1]->title()); - $this->assertSame('Free white males 10-16 years', $columns[2]->title()); - $this->assertSame('Free white males 16-18 years', $columns[3]->title()); - $this->assertSame('Free white males 16-26 years', $columns[4]->title()); - $this->assertSame('Free white males 26-45 years', $columns[5]->title()); - $this->assertSame('Free white males 45+ years', $columns[6]->title()); - $this->assertSame('Free white females 0-10 years', $columns[7]->title()); - $this->assertSame('Free white females 10-16 years', $columns[8]->title()); - $this->assertSame('Free white females 16-26 years', $columns[9]->title()); - $this->assertSame('Free white females 26-45 years', $columns[10]->title()); - $this->assertSame('Free white females 45+ years', $columns[11]->title()); - $this->assertSame('Foreigners not naturalized', $columns[12]->title()); - $this->assertSame('No. engaged in agriculture', $columns[13]->title()); - $this->assertSame('No. engaged in commerce', $columns[14]->title()); - $this->assertSame('No. engaged in manufactures', $columns[15]->title()); - $this->assertSame('Slave males 0-14 years', $columns[16]->title()); - $this->assertSame('Slave males 14-26 years', $columns[17]->title()); - $this->assertSame('Slave males 26-45 years', $columns[18]->title()); - $this->assertSame('Slave males 45+ years', $columns[19]->title()); - $this->assertSame('Slave females 0-14 years', $columns[20]->title()); - $this->assertSame('Slave females 14-26 years', $columns[21]->title()); - $this->assertSame('Slave females 26-45 years', $columns[22]->title()); - $this->assertSame('Slave females 45+ years', $columns[23]->title()); - $this->assertSame('Free colored males 0-14 years', $columns[24]->title()); - $this->assertSame('Free colored males 14-26 years', $columns[25]->title()); - $this->assertSame('Free colored males 26-45 years', $columns[26]->title()); - $this->assertSame('Free colored males 45+ years', $columns[27]->title()); - $this->assertSame('Free colored females 0-14 years', $columns[28]->title()); - $this->assertSame('Free colored females 14-26 years', $columns[29]->title()); - $this->assertSame('Free colored females 26-45 years', $columns[30]->title()); - $this->assertSame('Free colored females 45+ years', $columns[31]->title()); - } + $this->assertSame('Name of head of family', $columns[0]->title()); + $this->assertSame('Free white males 0-10 years', $columns[1]->title()); + $this->assertSame('Free white males 10-16 years', $columns[2]->title()); + $this->assertSame('Free white males 16-18 years', $columns[3]->title()); + $this->assertSame('Free white males 16-26 years', $columns[4]->title()); + $this->assertSame('Free white males 26-45 years', $columns[5]->title()); + $this->assertSame('Free white males 45+ years', $columns[6]->title()); + $this->assertSame('Free white females 0-10 years', $columns[7]->title()); + $this->assertSame('Free white females 10-16 years', $columns[8]->title()); + $this->assertSame('Free white females 16-26 years', $columns[9]->title()); + $this->assertSame('Free white females 26-45 years', $columns[10]->title()); + $this->assertSame('Free white females 45+ years', $columns[11]->title()); + $this->assertSame('Foreigners not naturalized', $columns[12]->title()); + $this->assertSame('No. engaged in agriculture', $columns[13]->title()); + $this->assertSame('No. engaged in commerce', $columns[14]->title()); + $this->assertSame('No. engaged in manufactures', $columns[15]->title()); + $this->assertSame('Slave males 0-14 years', $columns[16]->title()); + $this->assertSame('Slave males 14-26 years', $columns[17]->title()); + $this->assertSame('Slave males 26-45 years', $columns[18]->title()); + $this->assertSame('Slave males 45+ years', $columns[19]->title()); + $this->assertSame('Slave females 0-14 years', $columns[20]->title()); + $this->assertSame('Slave females 14-26 years', $columns[21]->title()); + $this->assertSame('Slave females 26-45 years', $columns[22]->title()); + $this->assertSame('Slave females 45+ years', $columns[23]->title()); + $this->assertSame('Free colored males 0-14 years', $columns[24]->title()); + $this->assertSame('Free colored males 14-26 years', $columns[25]->title()); + $this->assertSame('Free colored males 26-45 years', $columns[26]->title()); + $this->assertSame('Free colored males 45+ years', $columns[27]->title()); + $this->assertSame('Free colored females 0-14 years', $columns[28]->title()); + $this->assertSame('Free colored females 14-26 years', $columns[29]->title()); + $this->assertSame('Free colored females 26-45 years', $columns[30]->title()); + $this->assertSame('Free colored females 45+ years', $columns[31]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1830Test.php b/tests/app/Census/CensusOfUnitedStates1830Test.php index 39354c0b60..c21348056c 100644 --- a/tests/app/Census/CensusOfUnitedStates1830Test.php +++ b/tests/app/Census/CensusOfUnitedStates1830Test.php @@ -19,184 +19,187 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1830 */ -class CensusOfUnitedStates1830Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1830 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1830; +class CensusOfUnitedStates1830Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1830 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1830; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('01 JUN 1830', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1830', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1830 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1830; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1830 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1830; + $columns = $census->columns(); - $this->assertCount(51, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[29]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[30]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[31]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[32]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[33]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[34]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[35]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[36]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[37]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[38]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[39]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[40]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[41]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[42]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[43]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[44]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[45]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[46]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[47]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[48]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[49]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[50]); + $this->assertCount(51, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[29]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[30]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[31]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[32]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[33]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[34]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[35]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[36]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[37]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[38]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[39]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[40]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[41]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[42]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[43]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[44]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[45]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[46]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[47]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[48]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[49]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[50]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('M0', $columns[1]->abbreviation()); - $this->assertSame('M5', $columns[2]->abbreviation()); - $this->assertSame('M10', $columns[3]->abbreviation()); - $this->assertSame('M15', $columns[4]->abbreviation()); - $this->assertSame('M20', $columns[5]->abbreviation()); - $this->assertSame('M30', $columns[6]->abbreviation()); - $this->assertSame('M40', $columns[7]->abbreviation()); - $this->assertSame('M50', $columns[8]->abbreviation()); - $this->assertSame('M60', $columns[9]->abbreviation()); - $this->assertSame('M70', $columns[10]->abbreviation()); - $this->assertSame('M80', $columns[11]->abbreviation()); - $this->assertSame('M90', $columns[12]->abbreviation()); - $this->assertSame('M100', $columns[13]->abbreviation()); - $this->assertSame('F0', $columns[14]->abbreviation()); - $this->assertSame('F5', $columns[15]->abbreviation()); - $this->assertSame('F10', $columns[16]->abbreviation()); - $this->assertSame('F15', $columns[17]->abbreviation()); - $this->assertSame('F20', $columns[18]->abbreviation()); - $this->assertSame('F30', $columns[19]->abbreviation()); - $this->assertSame('F40', $columns[20]->abbreviation()); - $this->assertSame('F50', $columns[21]->abbreviation()); - $this->assertSame('F60', $columns[22]->abbreviation()); - $this->assertSame('F70', $columns[23]->abbreviation()); - $this->assertSame('F80', $columns[24]->abbreviation()); - $this->assertSame('F90', $columns[25]->abbreviation()); - $this->assertSame('F100', $columns[26]->abbreviation()); - $this->assertSame('M0', $columns[27]->abbreviation()); - $this->assertSame('M10', $columns[28]->abbreviation()); - $this->assertSame('M24', $columns[29]->abbreviation()); - $this->assertSame('M36', $columns[30]->abbreviation()); - $this->assertSame('M55', $columns[31]->abbreviation()); - $this->assertSame('M100', $columns[32]->abbreviation()); - $this->assertSame('F0', $columns[33]->abbreviation()); - $this->assertSame('F10', $columns[34]->abbreviation()); - $this->assertSame('F24', $columns[35]->abbreviation()); - $this->assertSame('F36', $columns[36]->abbreviation()); - $this->assertSame('F55', $columns[37]->abbreviation()); - $this->assertSame('F100', $columns[38]->abbreviation()); - $this->assertSame('M0', $columns[39]->abbreviation()); - $this->assertSame('M10', $columns[40]->abbreviation()); - $this->assertSame('M24', $columns[41]->abbreviation()); - $this->assertSame('M36', $columns[42]->abbreviation()); - $this->assertSame('M55', $columns[43]->abbreviation()); - $this->assertSame('M100', $columns[44]->abbreviation()); - $this->assertSame('F0', $columns[45]->abbreviation()); - $this->assertSame('F10', $columns[46]->abbreviation()); - $this->assertSame('F24', $columns[47]->abbreviation()); - $this->assertSame('F36', $columns[48]->abbreviation()); - $this->assertSame('F55', $columns[49]->abbreviation()); - $this->assertSame('F100', $columns[50]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('M0', $columns[1]->abbreviation()); + $this->assertSame('M5', $columns[2]->abbreviation()); + $this->assertSame('M10', $columns[3]->abbreviation()); + $this->assertSame('M15', $columns[4]->abbreviation()); + $this->assertSame('M20', $columns[5]->abbreviation()); + $this->assertSame('M30', $columns[6]->abbreviation()); + $this->assertSame('M40', $columns[7]->abbreviation()); + $this->assertSame('M50', $columns[8]->abbreviation()); + $this->assertSame('M60', $columns[9]->abbreviation()); + $this->assertSame('M70', $columns[10]->abbreviation()); + $this->assertSame('M80', $columns[11]->abbreviation()); + $this->assertSame('M90', $columns[12]->abbreviation()); + $this->assertSame('M100', $columns[13]->abbreviation()); + $this->assertSame('F0', $columns[14]->abbreviation()); + $this->assertSame('F5', $columns[15]->abbreviation()); + $this->assertSame('F10', $columns[16]->abbreviation()); + $this->assertSame('F15', $columns[17]->abbreviation()); + $this->assertSame('F20', $columns[18]->abbreviation()); + $this->assertSame('F30', $columns[19]->abbreviation()); + $this->assertSame('F40', $columns[20]->abbreviation()); + $this->assertSame('F50', $columns[21]->abbreviation()); + $this->assertSame('F60', $columns[22]->abbreviation()); + $this->assertSame('F70', $columns[23]->abbreviation()); + $this->assertSame('F80', $columns[24]->abbreviation()); + $this->assertSame('F90', $columns[25]->abbreviation()); + $this->assertSame('F100', $columns[26]->abbreviation()); + $this->assertSame('M0', $columns[27]->abbreviation()); + $this->assertSame('M10', $columns[28]->abbreviation()); + $this->assertSame('M24', $columns[29]->abbreviation()); + $this->assertSame('M36', $columns[30]->abbreviation()); + $this->assertSame('M55', $columns[31]->abbreviation()); + $this->assertSame('M100', $columns[32]->abbreviation()); + $this->assertSame('F0', $columns[33]->abbreviation()); + $this->assertSame('F10', $columns[34]->abbreviation()); + $this->assertSame('F24', $columns[35]->abbreviation()); + $this->assertSame('F36', $columns[36]->abbreviation()); + $this->assertSame('F55', $columns[37]->abbreviation()); + $this->assertSame('F100', $columns[38]->abbreviation()); + $this->assertSame('M0', $columns[39]->abbreviation()); + $this->assertSame('M10', $columns[40]->abbreviation()); + $this->assertSame('M24', $columns[41]->abbreviation()); + $this->assertSame('M36', $columns[42]->abbreviation()); + $this->assertSame('M55', $columns[43]->abbreviation()); + $this->assertSame('M100', $columns[44]->abbreviation()); + $this->assertSame('F0', $columns[45]->abbreviation()); + $this->assertSame('F10', $columns[46]->abbreviation()); + $this->assertSame('F24', $columns[47]->abbreviation()); + $this->assertSame('F36', $columns[48]->abbreviation()); + $this->assertSame('F55', $columns[49]->abbreviation()); + $this->assertSame('F100', $columns[50]->abbreviation()); - $this->assertSame('Name of head of family', $columns[0]->title()); - $this->assertSame('Free white males 0-5 years', $columns[1]->title()); - $this->assertSame('Free white males 5-10 years', $columns[2]->title()); - $this->assertSame('Free white males 10-15 years', $columns[3]->title()); - $this->assertSame('Free white males 15-20 years', $columns[4]->title()); - $this->assertSame('Free white males 20-30 years', $columns[5]->title()); - $this->assertSame('Free white males 30-40 years', $columns[6]->title()); - $this->assertSame('Free white males 40-50 years', $columns[7]->title()); - $this->assertSame('Free white males 50-60 years', $columns[8]->title()); - $this->assertSame('Free white males 60-70 years', $columns[9]->title()); - $this->assertSame('Free white males 70-80 years', $columns[10]->title()); - $this->assertSame('Free white males 80-90 years', $columns[11]->title()); - $this->assertSame('Free white males 90-100 years', $columns[12]->title()); - $this->assertSame('Free white males 100+ years', $columns[13]->title()); - $this->assertSame('Free white females 0-5 years', $columns[14]->title()); - $this->assertSame('Free white females 5-10 years', $columns[15]->title()); - $this->assertSame('Free white females 10-15 years', $columns[16]->title()); - $this->assertSame('Free white females 15-20 years', $columns[17]->title()); - $this->assertSame('Free white females 20-30 years', $columns[18]->title()); - $this->assertSame('Free white females 30-40 years', $columns[19]->title()); - $this->assertSame('Free white females 40-50 years', $columns[20]->title()); - $this->assertSame('Free white females 50-60 years', $columns[21]->title()); - $this->assertSame('Free white females 60-70 years', $columns[22]->title()); - $this->assertSame('Free white females 70-80 years', $columns[23]->title()); - $this->assertSame('Free white females 80-90 years', $columns[24]->title()); - $this->assertSame('Free white females 90-100 years', $columns[25]->title()); - $this->assertSame('Free white females 100+ years', $columns[26]->title()); - $this->assertSame('Slave males 0-10 years', $columns[27]->title()); - $this->assertSame('Slave males 10-24 years', $columns[28]->title()); - $this->assertSame('Slave males 24-36 years', $columns[29]->title()); - $this->assertSame('Slave males 36-55 years', $columns[30]->title()); - $this->assertSame('Slave males 55-100 years', $columns[31]->title()); - $this->assertSame('Slave males 100+ years', $columns[32]->title()); - $this->assertSame('Slave females 0-10 years', $columns[33]->title()); - $this->assertSame('Slave females 10-24 years', $columns[34]->title()); - $this->assertSame('Slave females 24-36 years', $columns[35]->title()); - $this->assertSame('Slave females 36-55 years', $columns[36]->title()); - $this->assertSame('Slave females 55-100 years', $columns[37]->title()); - $this->assertSame('Slave females 100+ years', $columns[38]->title()); - $this->assertSame('Free colored males 0-10 years', $columns[39]->title()); - $this->assertSame('Free colored males 10-24 years', $columns[40]->title()); - $this->assertSame('Free colored males 24-36 years', $columns[41]->title()); - $this->assertSame('Free colored males 36-55 years', $columns[42]->title()); - $this->assertSame('Free colored males 55-100 years', $columns[43]->title()); - $this->assertSame('Free colored males 100+ years', $columns[44]->title()); - $this->assertSame('Free colored females 0-10 years', $columns[45]->title()); - $this->assertSame('Free colored females 10-24 years', $columns[46]->title()); - $this->assertSame('Free colored females 24-36 years', $columns[47]->title()); - $this->assertSame('Free colored females 36-55 years', $columns[48]->title()); - $this->assertSame('Free colored females 55-100 years', $columns[49]->title()); - $this->assertSame('Free colored females 100+ years', $columns[50]->title()); - } + $this->assertSame('Name of head of family', $columns[0]->title()); + $this->assertSame('Free white males 0-5 years', $columns[1]->title()); + $this->assertSame('Free white males 5-10 years', $columns[2]->title()); + $this->assertSame('Free white males 10-15 years', $columns[3]->title()); + $this->assertSame('Free white males 15-20 years', $columns[4]->title()); + $this->assertSame('Free white males 20-30 years', $columns[5]->title()); + $this->assertSame('Free white males 30-40 years', $columns[6]->title()); + $this->assertSame('Free white males 40-50 years', $columns[7]->title()); + $this->assertSame('Free white males 50-60 years', $columns[8]->title()); + $this->assertSame('Free white males 60-70 years', $columns[9]->title()); + $this->assertSame('Free white males 70-80 years', $columns[10]->title()); + $this->assertSame('Free white males 80-90 years', $columns[11]->title()); + $this->assertSame('Free white males 90-100 years', $columns[12]->title()); + $this->assertSame('Free white males 100+ years', $columns[13]->title()); + $this->assertSame('Free white females 0-5 years', $columns[14]->title()); + $this->assertSame('Free white females 5-10 years', $columns[15]->title()); + $this->assertSame('Free white females 10-15 years', $columns[16]->title()); + $this->assertSame('Free white females 15-20 years', $columns[17]->title()); + $this->assertSame('Free white females 20-30 years', $columns[18]->title()); + $this->assertSame('Free white females 30-40 years', $columns[19]->title()); + $this->assertSame('Free white females 40-50 years', $columns[20]->title()); + $this->assertSame('Free white females 50-60 years', $columns[21]->title()); + $this->assertSame('Free white females 60-70 years', $columns[22]->title()); + $this->assertSame('Free white females 70-80 years', $columns[23]->title()); + $this->assertSame('Free white females 80-90 years', $columns[24]->title()); + $this->assertSame('Free white females 90-100 years', $columns[25]->title()); + $this->assertSame('Free white females 100+ years', $columns[26]->title()); + $this->assertSame('Slave males 0-10 years', $columns[27]->title()); + $this->assertSame('Slave males 10-24 years', $columns[28]->title()); + $this->assertSame('Slave males 24-36 years', $columns[29]->title()); + $this->assertSame('Slave males 36-55 years', $columns[30]->title()); + $this->assertSame('Slave males 55-100 years', $columns[31]->title()); + $this->assertSame('Slave males 100+ years', $columns[32]->title()); + $this->assertSame('Slave females 0-10 years', $columns[33]->title()); + $this->assertSame('Slave females 10-24 years', $columns[34]->title()); + $this->assertSame('Slave females 24-36 years', $columns[35]->title()); + $this->assertSame('Slave females 36-55 years', $columns[36]->title()); + $this->assertSame('Slave females 55-100 years', $columns[37]->title()); + $this->assertSame('Slave females 100+ years', $columns[38]->title()); + $this->assertSame('Free colored males 0-10 years', $columns[39]->title()); + $this->assertSame('Free colored males 10-24 years', $columns[40]->title()); + $this->assertSame('Free colored males 24-36 years', $columns[41]->title()); + $this->assertSame('Free colored males 36-55 years', $columns[42]->title()); + $this->assertSame('Free colored males 55-100 years', $columns[43]->title()); + $this->assertSame('Free colored males 100+ years', $columns[44]->title()); + $this->assertSame('Free colored females 0-10 years', $columns[45]->title()); + $this->assertSame('Free colored females 10-24 years', $columns[46]->title()); + $this->assertSame('Free colored females 24-36 years', $columns[47]->title()); + $this->assertSame('Free colored females 36-55 years', $columns[48]->title()); + $this->assertSame('Free colored females 55-100 years', $columns[49]->title()); + $this->assertSame('Free colored females 100+ years', $columns[50]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1840Test.php b/tests/app/Census/CensusOfUnitedStates1840Test.php index 763af2d783..79cea50888 100644 --- a/tests/app/Census/CensusOfUnitedStates1840Test.php +++ b/tests/app/Census/CensusOfUnitedStates1840Test.php @@ -19,148 +19,151 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1840 */ -class CensusOfUnitedStates1840Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1840 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1840; +class CensusOfUnitedStates1840Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1840 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1840; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('01 JUN 1840', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1840', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1840 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1840; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1840 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1840; + $columns = $census->columns(); - $this->assertCount(39, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[29]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[30]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[31]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[32]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[33]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[34]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[35]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[36]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[37]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[38]); + $this->assertCount(39, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[29]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[30]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[31]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[32]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[33]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[34]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[35]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[36]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[37]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[38]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('M0', $columns[1]->abbreviation()); - $this->assertSame('M5', $columns[2]->abbreviation()); - $this->assertSame('M10', $columns[3]->abbreviation()); - $this->assertSame('M15', $columns[4]->abbreviation()); - $this->assertSame('M20', $columns[5]->abbreviation()); - $this->assertSame('M30', $columns[6]->abbreviation()); - $this->assertSame('M40', $columns[7]->abbreviation()); - $this->assertSame('M50', $columns[8]->abbreviation()); - $this->assertSame('M60', $columns[9]->abbreviation()); - $this->assertSame('M70', $columns[10]->abbreviation()); - $this->assertSame('M80', $columns[11]->abbreviation()); - $this->assertSame('M90', $columns[12]->abbreviation()); - $this->assertSame('M100', $columns[13]->abbreviation()); - $this->assertSame('F0', $columns[14]->abbreviation()); - $this->assertSame('F5', $columns[15]->abbreviation()); - $this->assertSame('F10', $columns[16]->abbreviation()); - $this->assertSame('F15', $columns[17]->abbreviation()); - $this->assertSame('F20', $columns[18]->abbreviation()); - $this->assertSame('F30', $columns[19]->abbreviation()); - $this->assertSame('F40', $columns[20]->abbreviation()); - $this->assertSame('F50', $columns[21]->abbreviation()); - $this->assertSame('F60', $columns[22]->abbreviation()); - $this->assertSame('F70', $columns[23]->abbreviation()); - $this->assertSame('F80', $columns[24]->abbreviation()); - $this->assertSame('F90', $columns[25]->abbreviation()); - $this->assertSame('F100', $columns[26]->abbreviation()); - $this->assertSame('M0', $columns[27]->abbreviation()); - $this->assertSame('M10', $columns[28]->abbreviation()); - $this->assertSame('M24', $columns[29]->abbreviation()); - $this->assertSame('M36', $columns[30]->abbreviation()); - $this->assertSame('M55', $columns[31]->abbreviation()); - $this->assertSame('M100', $columns[32]->abbreviation()); - $this->assertSame('F0', $columns[33]->abbreviation()); - $this->assertSame('F10', $columns[34]->abbreviation()); - $this->assertSame('F24', $columns[35]->abbreviation()); - $this->assertSame('F36', $columns[36]->abbreviation()); - $this->assertSame('F55', $columns[37]->abbreviation()); - $this->assertSame('F100', $columns[38]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('M0', $columns[1]->abbreviation()); + $this->assertSame('M5', $columns[2]->abbreviation()); + $this->assertSame('M10', $columns[3]->abbreviation()); + $this->assertSame('M15', $columns[4]->abbreviation()); + $this->assertSame('M20', $columns[5]->abbreviation()); + $this->assertSame('M30', $columns[6]->abbreviation()); + $this->assertSame('M40', $columns[7]->abbreviation()); + $this->assertSame('M50', $columns[8]->abbreviation()); + $this->assertSame('M60', $columns[9]->abbreviation()); + $this->assertSame('M70', $columns[10]->abbreviation()); + $this->assertSame('M80', $columns[11]->abbreviation()); + $this->assertSame('M90', $columns[12]->abbreviation()); + $this->assertSame('M100', $columns[13]->abbreviation()); + $this->assertSame('F0', $columns[14]->abbreviation()); + $this->assertSame('F5', $columns[15]->abbreviation()); + $this->assertSame('F10', $columns[16]->abbreviation()); + $this->assertSame('F15', $columns[17]->abbreviation()); + $this->assertSame('F20', $columns[18]->abbreviation()); + $this->assertSame('F30', $columns[19]->abbreviation()); + $this->assertSame('F40', $columns[20]->abbreviation()); + $this->assertSame('F50', $columns[21]->abbreviation()); + $this->assertSame('F60', $columns[22]->abbreviation()); + $this->assertSame('F70', $columns[23]->abbreviation()); + $this->assertSame('F80', $columns[24]->abbreviation()); + $this->assertSame('F90', $columns[25]->abbreviation()); + $this->assertSame('F100', $columns[26]->abbreviation()); + $this->assertSame('M0', $columns[27]->abbreviation()); + $this->assertSame('M10', $columns[28]->abbreviation()); + $this->assertSame('M24', $columns[29]->abbreviation()); + $this->assertSame('M36', $columns[30]->abbreviation()); + $this->assertSame('M55', $columns[31]->abbreviation()); + $this->assertSame('M100', $columns[32]->abbreviation()); + $this->assertSame('F0', $columns[33]->abbreviation()); + $this->assertSame('F10', $columns[34]->abbreviation()); + $this->assertSame('F24', $columns[35]->abbreviation()); + $this->assertSame('F36', $columns[36]->abbreviation()); + $this->assertSame('F55', $columns[37]->abbreviation()); + $this->assertSame('F100', $columns[38]->abbreviation()); - $this->assertSame('Name of head of family', $columns[0]->title()); - $this->assertSame('Free white males 0-5 years', $columns[1]->title()); - $this->assertSame('Free white males 5-10 years', $columns[2]->title()); - $this->assertSame('Free white males 10-15 years', $columns[3]->title()); - $this->assertSame('Free white males 15-20 years', $columns[4]->title()); - $this->assertSame('Free white males 20-30 years', $columns[5]->title()); - $this->assertSame('Free white males 30-40 years', $columns[6]->title()); - $this->assertSame('Free white males 40-50 years', $columns[7]->title()); - $this->assertSame('Free white males 50-60 years', $columns[8]->title()); - $this->assertSame('Free white males 60-70 years', $columns[9]->title()); - $this->assertSame('Free white males 70-80 years', $columns[10]->title()); - $this->assertSame('Free white males 80-90 years', $columns[11]->title()); - $this->assertSame('Free white males 90-100 years', $columns[12]->title()); - $this->assertSame('Free white males 100+ years', $columns[13]->title()); - $this->assertSame('Free white females 0-5 years', $columns[14]->title()); - $this->assertSame('Free white females 5-10 years', $columns[15]->title()); - $this->assertSame('Free white females 10-15 years', $columns[16]->title()); - $this->assertSame('Free white females 15-20 years', $columns[17]->title()); - $this->assertSame('Free white females 20-30 years', $columns[18]->title()); - $this->assertSame('Free white females 30-40 years', $columns[19]->title()); - $this->assertSame('Free white females 40-50 years', $columns[20]->title()); - $this->assertSame('Free white females 50-60 years', $columns[21]->title()); - $this->assertSame('Free white females 60-70 years', $columns[22]->title()); - $this->assertSame('Free white females 70-80 years', $columns[23]->title()); - $this->assertSame('Free white females 80-90 years', $columns[24]->title()); - $this->assertSame('Free white females 90-100 years', $columns[25]->title()); - $this->assertSame('Free white females 100+ years', $columns[26]->title()); - $this->assertSame('Free colored males 0-10 years', $columns[27]->title()); - $this->assertSame('Free colored males 10-24 years', $columns[28]->title()); - $this->assertSame('Free colored males 24-36 years', $columns[29]->title()); - $this->assertSame('Free colored males 36-55 years', $columns[30]->title()); - $this->assertSame('Free colored males 55-100 years', $columns[31]->title()); - $this->assertSame('Free colored males 100+ years', $columns[32]->title()); - $this->assertSame('Free colored females 0-10 years', $columns[33]->title()); - $this->assertSame('Free colored females 10-24 years', $columns[34]->title()); - $this->assertSame('Free colored females 24-36 years', $columns[35]->title()); - $this->assertSame('Free colored females 36-55 years', $columns[36]->title()); - $this->assertSame('Free colored females 55-100 years', $columns[37]->title()); - $this->assertSame('Free colored females 100+ years', $columns[38]->title()); - } + $this->assertSame('Name of head of family', $columns[0]->title()); + $this->assertSame('Free white males 0-5 years', $columns[1]->title()); + $this->assertSame('Free white males 5-10 years', $columns[2]->title()); + $this->assertSame('Free white males 10-15 years', $columns[3]->title()); + $this->assertSame('Free white males 15-20 years', $columns[4]->title()); + $this->assertSame('Free white males 20-30 years', $columns[5]->title()); + $this->assertSame('Free white males 30-40 years', $columns[6]->title()); + $this->assertSame('Free white males 40-50 years', $columns[7]->title()); + $this->assertSame('Free white males 50-60 years', $columns[8]->title()); + $this->assertSame('Free white males 60-70 years', $columns[9]->title()); + $this->assertSame('Free white males 70-80 years', $columns[10]->title()); + $this->assertSame('Free white males 80-90 years', $columns[11]->title()); + $this->assertSame('Free white males 90-100 years', $columns[12]->title()); + $this->assertSame('Free white males 100+ years', $columns[13]->title()); + $this->assertSame('Free white females 0-5 years', $columns[14]->title()); + $this->assertSame('Free white females 5-10 years', $columns[15]->title()); + $this->assertSame('Free white females 10-15 years', $columns[16]->title()); + $this->assertSame('Free white females 15-20 years', $columns[17]->title()); + $this->assertSame('Free white females 20-30 years', $columns[18]->title()); + $this->assertSame('Free white females 30-40 years', $columns[19]->title()); + $this->assertSame('Free white females 40-50 years', $columns[20]->title()); + $this->assertSame('Free white females 50-60 years', $columns[21]->title()); + $this->assertSame('Free white females 60-70 years', $columns[22]->title()); + $this->assertSame('Free white females 70-80 years', $columns[23]->title()); + $this->assertSame('Free white females 80-90 years', $columns[24]->title()); + $this->assertSame('Free white females 90-100 years', $columns[25]->title()); + $this->assertSame('Free white females 100+ years', $columns[26]->title()); + $this->assertSame('Free colored males 0-10 years', $columns[27]->title()); + $this->assertSame('Free colored males 10-24 years', $columns[28]->title()); + $this->assertSame('Free colored males 24-36 years', $columns[29]->title()); + $this->assertSame('Free colored males 36-55 years', $columns[30]->title()); + $this->assertSame('Free colored males 55-100 years', $columns[31]->title()); + $this->assertSame('Free colored males 100+ years', $columns[32]->title()); + $this->assertSame('Free colored females 0-10 years', $columns[33]->title()); + $this->assertSame('Free colored females 10-24 years', $columns[34]->title()); + $this->assertSame('Free colored females 24-36 years', $columns[35]->title()); + $this->assertSame('Free colored females 36-55 years', $columns[36]->title()); + $this->assertSame('Free colored females 55-100 years', $columns[37]->title()); + $this->assertSame('Free colored females 100+ years', $columns[38]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1850Test.php b/tests/app/Census/CensusOfUnitedStates1850Test.php index e88c58ee7f..1a6f447415 100644 --- a/tests/app/Census/CensusOfUnitedStates1850Test.php +++ b/tests/app/Census/CensusOfUnitedStates1850Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1850 */ -class CensusOfUnitedStates1850Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1850 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1850; +class CensusOfUnitedStates1850Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1850 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1850; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('01 JUN 1850', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1850', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1850 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1850; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1850 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1850; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Age', $columns[1]->abbreviation()); - $this->assertSame('Sex', $columns[2]->abbreviation()); - $this->assertSame('Color', $columns[3]->abbreviation()); - $this->assertSame('Occupation', $columns[4]->abbreviation()); - $this->assertSame('RE', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Mar', $columns[7]->abbreviation()); - $this->assertSame('School', $columns[8]->abbreviation()); - $this->assertSame('R+W', $columns[9]->abbreviation()); - $this->assertSame('Infirm', $columns[10]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Age', $columns[1]->abbreviation()); + $this->assertSame('Sex', $columns[2]->abbreviation()); + $this->assertSame('Color', $columns[3]->abbreviation()); + $this->assertSame('Occupation', $columns[4]->abbreviation()); + $this->assertSame('RE', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Mar', $columns[7]->abbreviation()); + $this->assertSame('School', $columns[8]->abbreviation()); + $this->assertSame('R+W', $columns[9]->abbreviation()); + $this->assertSame('Infirm', $columns[10]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Age', $columns[1]->title()); - $this->assertSame('Sex', $columns[2]->title()); - $this->assertSame('White, black, or mulatto', $columns[3]->title()); - $this->assertSame('Profession, occupation, or trade', $columns[4]->title()); - $this->assertSame('Value of real estate owned', $columns[5]->title()); - $this->assertSame('Place of birth, naming the state, territory, or country', $columns[6]->title()); - $this->assertSame('Married within the year', $columns[7]->title()); - $this->assertSame('Attended school within the year', $columns[8]->title()); - $this->assertSame('Persons over 20 years of age who cannot read and write', $columns[9]->title()); - $this->assertSame('Whether deaf and dumb, blind, insane, idiotic, pauper or convict', $columns[10]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Age', $columns[1]->title()); + $this->assertSame('Sex', $columns[2]->title()); + $this->assertSame('White, black, or mulatto', $columns[3]->title()); + $this->assertSame('Profession, occupation, or trade', $columns[4]->title()); + $this->assertSame('Value of real estate owned', $columns[5]->title()); + $this->assertSame('Place of birth, naming the state, territory, or country', $columns[6]->title()); + $this->assertSame('Married within the year', $columns[7]->title()); + $this->assertSame('Attended school within the year', $columns[8]->title()); + $this->assertSame('Persons over 20 years of age who cannot read and write', $columns[9]->title()); + $this->assertSame('Whether deaf and dumb, blind, insane, idiotic, pauper or convict', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1860Test.php b/tests/app/Census/CensusOfUnitedStates1860Test.php index 0a36f75c7b..e701dd38ac 100644 --- a/tests/app/Census/CensusOfUnitedStates1860Test.php +++ b/tests/app/Census/CensusOfUnitedStates1860Test.php @@ -19,67 +19,70 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1860 */ -class CensusOfUnitedStates1860Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1860 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1860; +class CensusOfUnitedStates1860Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1860 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1860; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('BET JUN 1860 AND OCT 1860', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('BET JUN 1860 AND OCT 1860', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1860 - */ - public function testColumns() { - $census = new CensusOfUnitedStates1860; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1860 + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1860; + $columns = $census->columns(); - $this->assertCount(12, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertCount(12, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Age', $columns[1]->abbreviation()); - $this->assertSame('Sex', $columns[2]->abbreviation()); - $this->assertSame('Color', $columns[3]->abbreviation()); - $this->assertSame('Occupation', $columns[4]->abbreviation()); - $this->assertSame('RE', $columns[5]->abbreviation()); - $this->assertSame('PE', $columns[6]->abbreviation()); - $this->assertSame('Birthplace', $columns[7]->abbreviation()); - $this->assertSame('Mar', $columns[8]->abbreviation()); - $this->assertSame('School', $columns[9]->abbreviation()); - $this->assertSame('R+W', $columns[10]->abbreviation()); - $this->assertSame('Infirm', $columns[11]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Age', $columns[1]->abbreviation()); + $this->assertSame('Sex', $columns[2]->abbreviation()); + $this->assertSame('Color', $columns[3]->abbreviation()); + $this->assertSame('Occupation', $columns[4]->abbreviation()); + $this->assertSame('RE', $columns[5]->abbreviation()); + $this->assertSame('PE', $columns[6]->abbreviation()); + $this->assertSame('Birthplace', $columns[7]->abbreviation()); + $this->assertSame('Mar', $columns[8]->abbreviation()); + $this->assertSame('School', $columns[9]->abbreviation()); + $this->assertSame('R+W', $columns[10]->abbreviation()); + $this->assertSame('Infirm', $columns[11]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Age', $columns[1]->title()); - $this->assertSame('Sex', $columns[2]->title()); - $this->assertSame('White, black, or mulatto', $columns[3]->title()); - $this->assertSame('Profession, occupation, or trade', $columns[4]->title()); - $this->assertSame('Value of real estate owned', $columns[5]->title()); - $this->assertSame('Value of personal estate owned', $columns[6]->title()); - $this->assertSame('Place of birth, naming the state, territory, or country', $columns[7]->title()); - $this->assertSame('Married within the year', $columns[8]->title()); - $this->assertSame('Attended school within the year', $columns[9]->title()); - $this->assertSame('Persons over 20 years of age who cannot read and write', $columns[10]->title()); - $this->assertSame('Whether deaf and dumb, blind, insane, idiotic, pauper or convict', $columns[11]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Age', $columns[1]->title()); + $this->assertSame('Sex', $columns[2]->title()); + $this->assertSame('White, black, or mulatto', $columns[3]->title()); + $this->assertSame('Profession, occupation, or trade', $columns[4]->title()); + $this->assertSame('Value of real estate owned', $columns[5]->title()); + $this->assertSame('Value of personal estate owned', $columns[6]->title()); + $this->assertSame('Place of birth, naming the state, territory, or country', $columns[7]->title()); + $this->assertSame('Married within the year', $columns[8]->title()); + $this->assertSame('Attended school within the year', $columns[9]->title()); + $this->assertSame('Persons over 20 years of age who cannot read and write', $columns[10]->title()); + $this->assertSame('Whether deaf and dumb, blind, insane, idiotic, pauper or convict', $columns[11]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1870Test.php b/tests/app/Census/CensusOfUnitedStates1870Test.php index ccff640273..d86f5841aa 100644 --- a/tests/app/Census/CensusOfUnitedStates1870Test.php +++ b/tests/app/Census/CensusOfUnitedStates1870Test.php @@ -19,85 +19,88 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1870 */ -class CensusOfUnitedStates1870Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1870 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1870; +class CensusOfUnitedStates1870Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1870 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1870; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('JUN 1870', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('JUN 1870', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1870 - */ - public function testColumns() { - $census = new CensusOfUnitedStates1870; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1870 + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1870; + $columns = $census->columns(); - $this->assertCount(18, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherForeign', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherForeign', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertCount(18, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherForeign', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherForeign', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Age', $columns[1]->abbreviation()); - $this->assertSame('Sex', $columns[2]->abbreviation()); - $this->assertSame('Color', $columns[3]->abbreviation()); - $this->assertSame('Occupation', $columns[4]->abbreviation()); - $this->assertSame('RE', $columns[5]->abbreviation()); - $this->assertSame('PE', $columns[6]->abbreviation()); - $this->assertSame('Birthplace', $columns[7]->abbreviation()); - $this->assertSame('FFB', $columns[8]->abbreviation()); - $this->assertSame('MFB', $columns[9]->abbreviation()); - $this->assertSame('Born', $columns[10]->abbreviation()); - $this->assertSame('Mar', $columns[11]->abbreviation()); - $this->assertSame('School', $columns[12]->abbreviation()); - $this->assertSame('Read', $columns[13]->abbreviation()); - $this->assertSame('Write', $columns[14]->abbreviation()); - $this->assertSame('Infirm', $columns[15]->abbreviation()); - $this->assertSame('Cit', $columns[16]->abbreviation()); - $this->assertSame('Dis', $columns[17]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Age', $columns[1]->abbreviation()); + $this->assertSame('Sex', $columns[2]->abbreviation()); + $this->assertSame('Color', $columns[3]->abbreviation()); + $this->assertSame('Occupation', $columns[4]->abbreviation()); + $this->assertSame('RE', $columns[5]->abbreviation()); + $this->assertSame('PE', $columns[6]->abbreviation()); + $this->assertSame('Birthplace', $columns[7]->abbreviation()); + $this->assertSame('FFB', $columns[8]->abbreviation()); + $this->assertSame('MFB', $columns[9]->abbreviation()); + $this->assertSame('Born', $columns[10]->abbreviation()); + $this->assertSame('Mar', $columns[11]->abbreviation()); + $this->assertSame('School', $columns[12]->abbreviation()); + $this->assertSame('Read', $columns[13]->abbreviation()); + $this->assertSame('Write', $columns[14]->abbreviation()); + $this->assertSame('Infirm', $columns[15]->abbreviation()); + $this->assertSame('Cit', $columns[16]->abbreviation()); + $this->assertSame('Dis', $columns[17]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Age', $columns[1]->title()); - $this->assertSame('Sex', $columns[2]->title()); - $this->assertSame('White, Black, Mulatto, Chinese, Indian', $columns[3]->title()); - $this->assertSame('Profession, occupation, or trade', $columns[4]->title()); - $this->assertSame('Value of real estate owned', $columns[5]->title()); - $this->assertSame('Value of personal estate owned', $columns[6]->title()); - $this->assertSame('Place of birth, naming the state, territory, or country', $columns[7]->title()); - $this->assertSame('Father of foreign birth', $columns[8]->title()); - $this->assertSame('Mother of foreign birth', $columns[9]->title()); - $this->assertSame('If born within the year, state month', $columns[10]->title()); - $this->assertSame('If married within the year, state month', $columns[11]->title()); - $this->assertSame('Attended school within the year', $columns[12]->title()); - $this->assertSame('Cannot read', $columns[13]->title()); - $this->assertSame('Cannot write', $columns[14]->title()); - $this->assertSame('Whether deaf and dumb, blind, insane, or idiotic', $columns[15]->title()); - $this->assertSame('Male citizen of US', $columns[16]->title()); - $this->assertSame('Male citizen of US, where right to vote is denied or abridged', $columns[17]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Age', $columns[1]->title()); + $this->assertSame('Sex', $columns[2]->title()); + $this->assertSame('White, Black, Mulatto, Chinese, Indian', $columns[3]->title()); + $this->assertSame('Profession, occupation, or trade', $columns[4]->title()); + $this->assertSame('Value of real estate owned', $columns[5]->title()); + $this->assertSame('Value of personal estate owned', $columns[6]->title()); + $this->assertSame('Place of birth, naming the state, territory, or country', $columns[7]->title()); + $this->assertSame('Father of foreign birth', $columns[8]->title()); + $this->assertSame('Mother of foreign birth', $columns[9]->title()); + $this->assertSame('If born within the year, state month', $columns[10]->title()); + $this->assertSame('If married within the year, state month', $columns[11]->title()); + $this->assertSame('Attended school within the year', $columns[12]->title()); + $this->assertSame('Cannot read', $columns[13]->title()); + $this->assertSame('Cannot write', $columns[14]->title()); + $this->assertSame('Whether deaf and dumb, blind, insane, or idiotic', $columns[15]->title()); + $this->assertSame('Male citizen of US', $columns[16]->title()); + $this->assertSame('Male citizen of US, where right to vote is denied or abridged', $columns[17]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1880Test.php b/tests/app/Census/CensusOfUnitedStates1880Test.php index ba95661424..1f5da5e698 100644 --- a/tests/app/Census/CensusOfUnitedStates1880Test.php +++ b/tests/app/Census/CensusOfUnitedStates1880Test.php @@ -19,100 +19,103 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1880 */ -class CensusOfUnitedStates1880Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1880 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1880; +class CensusOfUnitedStates1880Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1880 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1880; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('JUN 1880', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('JUN 1880', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1880 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1880; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1880 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1880; + $columns = $census->columns(); - $this->assertCount(23, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[22]); + $this->assertCount(23, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfBornWithinYear', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMarriedWithinYear', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[22]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Age', $columns[1]->abbreviation()); - $this->assertSame('Sex', $columns[2]->abbreviation()); - $this->assertSame('Mon', $columns[3]->abbreviation()); - $this->assertSame('Relation', $columns[4]->abbreviation()); - $this->assertSame('S', $columns[5]->abbreviation()); - $this->assertSame('M', $columns[6]->abbreviation()); - $this->assertSame('W/D', $columns[7]->abbreviation()); - $this->assertSame('MY', $columns[8]->abbreviation()); - $this->assertSame('Occupation', $columns[9]->abbreviation()); - $this->assertSame('UnEm', $columns[10]->abbreviation()); - $this->assertSame('Sick', $columns[11]->abbreviation()); - $this->assertSame('Blind', $columns[12]->abbreviation()); - $this->assertSame('DD', $columns[13]->abbreviation()); - $this->assertSame('Idiotic', $columns[14]->abbreviation()); - $this->assertSame('Insane', $columns[15]->abbreviation()); - $this->assertSame('Disabled', $columns[16]->abbreviation()); - $this->assertSame('School', $columns[17]->abbreviation()); - $this->assertSame('Read', $columns[18]->abbreviation()); - $this->assertSame('Write', $columns[19]->abbreviation()); - $this->assertSame('BP', $columns[20]->abbreviation()); - $this->assertSame('FBP', $columns[21]->abbreviation()); - $this->assertSame('MBP', $columns[22]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Age', $columns[1]->abbreviation()); + $this->assertSame('Sex', $columns[2]->abbreviation()); + $this->assertSame('Mon', $columns[3]->abbreviation()); + $this->assertSame('Relation', $columns[4]->abbreviation()); + $this->assertSame('S', $columns[5]->abbreviation()); + $this->assertSame('M', $columns[6]->abbreviation()); + $this->assertSame('W/D', $columns[7]->abbreviation()); + $this->assertSame('MY', $columns[8]->abbreviation()); + $this->assertSame('Occupation', $columns[9]->abbreviation()); + $this->assertSame('UnEm', $columns[10]->abbreviation()); + $this->assertSame('Sick', $columns[11]->abbreviation()); + $this->assertSame('Blind', $columns[12]->abbreviation()); + $this->assertSame('DD', $columns[13]->abbreviation()); + $this->assertSame('Idiotic', $columns[14]->abbreviation()); + $this->assertSame('Insane', $columns[15]->abbreviation()); + $this->assertSame('Disabled', $columns[16]->abbreviation()); + $this->assertSame('School', $columns[17]->abbreviation()); + $this->assertSame('Read', $columns[18]->abbreviation()); + $this->assertSame('Write', $columns[19]->abbreviation()); + $this->assertSame('BP', $columns[20]->abbreviation()); + $this->assertSame('FBP', $columns[21]->abbreviation()); + $this->assertSame('MBP', $columns[22]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Age', $columns[1]->title()); - $this->assertSame('Sex', $columns[2]->title()); - $this->assertSame('If born within the year, state month', $columns[3]->title()); - $this->assertSame('Relation to head of household', $columns[4]->title()); - $this->assertSame('Single', $columns[5]->title()); - $this->assertSame('Married', $columns[6]->title()); - $this->assertSame('Widowed, Divorced', $columns[7]->title()); - $this->assertSame('Married during census year', $columns[8]->title()); - $this->assertSame('Profession, occupation, or trade', $columns[9]->title()); - $this->assertSame('Number of months the person has been unemployed during the census year', $columns[10]->title()); - $this->assertSame('Sickness or disability', $columns[11]->title()); - $this->assertSame('Blind', $columns[12]->title()); - $this->assertSame('Deaf and dumb', $columns[13]->title()); - $this->assertSame('Idiotic', $columns[14]->title()); - $this->assertSame('Insane', $columns[15]->title()); - $this->assertSame('Maimed, crippled, bedridden or otherwise disabled', $columns[16]->title()); - $this->assertSame('Attended school within the census year', $columns[17]->title()); - $this->assertSame('Cannot read', $columns[18]->title()); - $this->assertSame('Cannot write', $columns[19]->title()); - $this->assertSame('Place of birth, naming the state, territory, or country', $columns[20]->title()); - $this->assertSame('Place of birth of father, naming the state, territory, or country', $columns[21]->title()); - $this->assertSame('Place of birth of mother, naming the state, territory, or country', $columns[22]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Age', $columns[1]->title()); + $this->assertSame('Sex', $columns[2]->title()); + $this->assertSame('If born within the year, state month', $columns[3]->title()); + $this->assertSame('Relation to head of household', $columns[4]->title()); + $this->assertSame('Single', $columns[5]->title()); + $this->assertSame('Married', $columns[6]->title()); + $this->assertSame('Widowed, Divorced', $columns[7]->title()); + $this->assertSame('Married during census year', $columns[8]->title()); + $this->assertSame('Profession, occupation, or trade', $columns[9]->title()); + $this->assertSame('Number of months the person has been unemployed during the census year', $columns[10]->title()); + $this->assertSame('Sickness or disability', $columns[11]->title()); + $this->assertSame('Blind', $columns[12]->title()); + $this->assertSame('Deaf and dumb', $columns[13]->title()); + $this->assertSame('Idiotic', $columns[14]->title()); + $this->assertSame('Insane', $columns[15]->title()); + $this->assertSame('Maimed, crippled, bedridden or otherwise disabled', $columns[16]->title()); + $this->assertSame('Attended school within the census year', $columns[17]->title()); + $this->assertSame('Cannot read', $columns[18]->title()); + $this->assertSame('Cannot write', $columns[19]->title()); + $this->assertSame('Place of birth, naming the state, territory, or country', $columns[20]->title()); + $this->assertSame('Place of birth of father, naming the state, territory, or country', $columns[21]->title()); + $this->assertSame('Place of birth of mother, naming the state, territory, or country', $columns[22]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1890Test.php b/tests/app/Census/CensusOfUnitedStates1890Test.php index 9bde64bd54..1a0d07e07e 100644 --- a/tests/app/Census/CensusOfUnitedStates1890Test.php +++ b/tests/app/Census/CensusOfUnitedStates1890Test.php @@ -19,103 +19,106 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1890 */ -class CensusOfUnitedStates1890Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1890 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1890; +class CensusOfUnitedStates1890Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1890 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1890; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('02 JUN 1890', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('02 JUN 1890', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1890 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1890; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1890 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1890; + $columns = $census->columns(); - $this->assertCount(24, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertCount(24, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnGivenNameInitial', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurname', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMonthIfMarriedWithinYear', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Surname', $columns[1]->abbreviation()); - $this->assertSame('CW', $columns[2]->abbreviation()); - $this->assertSame('Relation', $columns[3]->abbreviation()); - $this->assertSame('Race', $columns[4]->abbreviation()); - $this->assertSame('Sex', $columns[5]->abbreviation()); - $this->assertSame('Age', $columns[6]->abbreviation()); - $this->assertSame('Cond', $columns[7]->abbreviation()); - $this->assertSame('Mar', $columns[8]->abbreviation()); - $this->assertSame('Chil', $columns[9]->abbreviation()); - $this->assertSame('BP', $columns[10]->abbreviation()); - $this->assertSame('FBP', $columns[11]->abbreviation()); - $this->assertSame('MBP', $columns[12]->abbreviation()); - $this->assertSame('US', $columns[13]->abbreviation()); - $this->assertSame('Nat', $columns[14]->abbreviation()); - $this->assertSame('Papers', $columns[15]->abbreviation()); - $this->assertSame('Occupation', $columns[16]->abbreviation()); - $this->assertSame('Unemp', $columns[17]->abbreviation()); - $this->assertSame('Read', $columns[18]->abbreviation()); - $this->assertSame('Write', $columns[19]->abbreviation()); - $this->assertSame('Eng', $columns[20]->abbreviation()); - $this->assertSame('Disease', $columns[21]->abbreviation()); - $this->assertSame('Infirm', $columns[22]->abbreviation()); - $this->assertSame('Prisoner', $columns[23]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Surname', $columns[1]->abbreviation()); + $this->assertSame('CW', $columns[2]->abbreviation()); + $this->assertSame('Relation', $columns[3]->abbreviation()); + $this->assertSame('Race', $columns[4]->abbreviation()); + $this->assertSame('Sex', $columns[5]->abbreviation()); + $this->assertSame('Age', $columns[6]->abbreviation()); + $this->assertSame('Cond', $columns[7]->abbreviation()); + $this->assertSame('Mar', $columns[8]->abbreviation()); + $this->assertSame('Chil', $columns[9]->abbreviation()); + $this->assertSame('BP', $columns[10]->abbreviation()); + $this->assertSame('FBP', $columns[11]->abbreviation()); + $this->assertSame('MBP', $columns[12]->abbreviation()); + $this->assertSame('US', $columns[13]->abbreviation()); + $this->assertSame('Nat', $columns[14]->abbreviation()); + $this->assertSame('Papers', $columns[15]->abbreviation()); + $this->assertSame('Occupation', $columns[16]->abbreviation()); + $this->assertSame('Unemp', $columns[17]->abbreviation()); + $this->assertSame('Read', $columns[18]->abbreviation()); + $this->assertSame('Write', $columns[19]->abbreviation()); + $this->assertSame('Eng', $columns[20]->abbreviation()); + $this->assertSame('Disease', $columns[21]->abbreviation()); + $this->assertSame('Infirm', $columns[22]->abbreviation()); + $this->assertSame('Prisoner', $columns[23]->abbreviation()); - $this->assertSame('Christian name in full, and initial of middle name', $columns[0]->title()); - $this->assertSame('Surname', $columns[1]->title()); - $this->assertSame('Whether a soldier, sailor or marine during the civil war (U.S. or Conf.), or widow of such person', $columns[2]->title()); - $this->assertSame('Relation to head of family', $columns[3]->title()); - $this->assertSame('Whether white, black, mulatto, quadroon, octoroon, Chinese, Japanese, or Indian', $columns[4]->title()); - $this->assertSame('Sex', $columns[5]->title()); - $this->assertSame('Age at nearest birthday. If under one year, give age in months', $columns[6]->title()); - $this->assertSame('Whether single, married, widowed, or divorced', $columns[7]->title()); - $this->assertSame('Whether married duirng the census year (June 1, 1889, to May 31, 1890)', $columns[8]->title()); - $this->assertSame('Mother of how many children, and number of these children living', $columns[9]->title()); - $this->assertSame('Place of birth', $columns[10]->title()); - $this->assertSame('Place of birth of father', $columns[11]->title()); - $this->assertSame('Place of birth of mother', $columns[12]->title()); - $this->assertSame('Number of years in the United States', $columns[13]->title()); - $this->assertSame('Whether naturalized', $columns[14]->title()); - $this->assertSame('Whether naturalization papers have been taken out', $columns[15]->title()); - $this->assertSame('Profession, trade, occupation', $columns[16]->title()); - $this->assertSame('Months unemployed during the census year (June 1, 1889, to May 31, 1890)', $columns[17]->title()); - $this->assertSame('Able to read', $columns[18]->title()); - $this->assertSame('Able to write', $columns[19]->title()); - $this->assertSame('Able to speak English. If not the language or dialect spoken', $columns[20]->title()); - $this->assertSame('Whether suffering from acute or chronic disease, with name of disease and length of time afflicted', $columns[21]->title()); - $this->assertSame('Whether defective in mind, sight, hearing, or speech, or whether crippled, maimed, or deformed, with name of defect', $columns[22]->title()); - $this->assertSame('Whether a prisoner, convict, homeless child, or pauper', $columns[23]->title()); - } + $this->assertSame('Christian name in full, and initial of middle name', $columns[0]->title()); + $this->assertSame('Surname', $columns[1]->title()); + $this->assertSame('Whether a soldier, sailor or marine during the civil war (U.S. or Conf.), or widow of such person', $columns[2]->title()); + $this->assertSame('Relation to head of family', $columns[3]->title()); + $this->assertSame('Whether white, black, mulatto, quadroon, octoroon, Chinese, Japanese, or Indian', $columns[4]->title()); + $this->assertSame('Sex', $columns[5]->title()); + $this->assertSame('Age at nearest birthday. If under one year, give age in months', $columns[6]->title()); + $this->assertSame('Whether single, married, widowed, or divorced', $columns[7]->title()); + $this->assertSame('Whether married duirng the census year (June 1, 1889, to May 31, 1890)', $columns[8]->title()); + $this->assertSame('Mother of how many children, and number of these children living', $columns[9]->title()); + $this->assertSame('Place of birth', $columns[10]->title()); + $this->assertSame('Place of birth of father', $columns[11]->title()); + $this->assertSame('Place of birth of mother', $columns[12]->title()); + $this->assertSame('Number of years in the United States', $columns[13]->title()); + $this->assertSame('Whether naturalized', $columns[14]->title()); + $this->assertSame('Whether naturalization papers have been taken out', $columns[15]->title()); + $this->assertSame('Profession, trade, occupation', $columns[16]->title()); + $this->assertSame('Months unemployed during the census year (June 1, 1889, to May 31, 1890)', $columns[17]->title()); + $this->assertSame('Able to read', $columns[18]->title()); + $this->assertSame('Able to write', $columns[19]->title()); + $this->assertSame('Able to speak English. If not the language or dialect spoken', $columns[20]->title()); + $this->assertSame('Whether suffering from acute or chronic disease, with name of disease and length of time afflicted', $columns[21]->title()); + $this->assertSame('Whether defective in mind, sight, hearing, or speech, or whether crippled, maimed, or deformed, with name of defect', $columns[22]->title()); + $this->assertSame('Whether a prisoner, convict, homeless child, or pauper', $columns[23]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1900Test.php b/tests/app/Census/CensusOfUnitedStates1900Test.php index e015b46c65..c7d5f60c45 100644 --- a/tests/app/Census/CensusOfUnitedStates1900Test.php +++ b/tests/app/Census/CensusOfUnitedStates1900Test.php @@ -19,109 +19,112 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1900 */ -class CensusOfUnitedStates1900Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1900 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1900; +class CensusOfUnitedStates1900Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1900 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1900; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('01 JUN 1900', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('01 JUN 1900', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1900 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1900; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1900 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1900; + $columns = $census->columns(); - $this->assertCount(26, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthMonth', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertCount(26, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthMonth', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthYear', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Race', $columns[2]->abbreviation()); - $this->assertSame('Sex', $columns[3]->abbreviation()); - $this->assertSame('Month', $columns[4]->abbreviation()); - $this->assertSame('Year', $columns[5]->abbreviation()); - $this->assertSame('Age', $columns[6]->abbreviation()); - $this->assertSame('Cond', $columns[7]->abbreviation()); - $this->assertSame('Marr', $columns[8]->abbreviation()); - $this->assertSame('Chil', $columns[9]->abbreviation()); - $this->assertSame('Chil', $columns[10]->abbreviation()); - $this->assertSame('BP', $columns[11]->abbreviation()); - $this->assertSame('FBP', $columns[12]->abbreviation()); - $this->assertSame('MBP', $columns[13]->abbreviation()); - $this->assertSame('Imm', $columns[14]->abbreviation()); - $this->assertSame('US', $columns[15]->abbreviation()); - $this->assertSame('Nat', $columns[16]->abbreviation()); - $this->assertSame('Occupation', $columns[17]->abbreviation()); - $this->assertSame('Unemp', $columns[18]->abbreviation()); - $this->assertSame('School', $columns[19]->abbreviation()); - $this->assertSame('Read', $columns[20]->abbreviation()); - $this->assertSame('Write', $columns[21]->abbreviation()); - $this->assertSame('Eng', $columns[22]->abbreviation()); - $this->assertSame('Home', $columns[23]->abbreviation()); - $this->assertSame('Mort', $columns[24]->abbreviation()); - $this->assertSame('Farm', $columns[25]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Race', $columns[2]->abbreviation()); + $this->assertSame('Sex', $columns[3]->abbreviation()); + $this->assertSame('Month', $columns[4]->abbreviation()); + $this->assertSame('Year', $columns[5]->abbreviation()); + $this->assertSame('Age', $columns[6]->abbreviation()); + $this->assertSame('Cond', $columns[7]->abbreviation()); + $this->assertSame('Marr', $columns[8]->abbreviation()); + $this->assertSame('Chil', $columns[9]->abbreviation()); + $this->assertSame('Chil', $columns[10]->abbreviation()); + $this->assertSame('BP', $columns[11]->abbreviation()); + $this->assertSame('FBP', $columns[12]->abbreviation()); + $this->assertSame('MBP', $columns[13]->abbreviation()); + $this->assertSame('Imm', $columns[14]->abbreviation()); + $this->assertSame('US', $columns[15]->abbreviation()); + $this->assertSame('Nat', $columns[16]->abbreviation()); + $this->assertSame('Occupation', $columns[17]->abbreviation()); + $this->assertSame('Unemp', $columns[18]->abbreviation()); + $this->assertSame('School', $columns[19]->abbreviation()); + $this->assertSame('Read', $columns[20]->abbreviation()); + $this->assertSame('Write', $columns[21]->abbreviation()); + $this->assertSame('Eng', $columns[22]->abbreviation()); + $this->assertSame('Home', $columns[23]->abbreviation()); + $this->assertSame('Mort', $columns[24]->abbreviation()); + $this->assertSame('Farm', $columns[25]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); - $this->assertSame('Color or race', $columns[2]->title()); - $this->assertSame('Sex', $columns[3]->title()); - $this->assertSame('Month of birth', $columns[4]->title()); - $this->assertSame('Year of birth', $columns[5]->title()); - $this->assertSame('Age at last birthday', $columns[6]->title()); - $this->assertSame('Whether single, married, widowed, or divorced', $columns[7]->title()); - $this->assertSame('Number of years married', $columns[8]->title()); - $this->assertSame('Mother of how many children', $columns[9]->title()); - $this->assertSame('Number of these children living', $columns[10]->title()); - $this->assertSame('Place of birth of this person', $columns[11]->title()); - $this->assertSame('Place of birth of father of this person', $columns[12]->title()); - $this->assertSame('Place of birth of mother of this person', $columns[13]->title()); - $this->assertSame('Year of immigration to the United States', $columns[14]->title()); - $this->assertSame('Number of years in the United States', $columns[15]->title()); - $this->assertSame('Naturalization', $columns[16]->title()); - $this->assertSame('Occupation, trade of profession', $columns[17]->title()); - $this->assertSame('Months not unemployed', $columns[18]->title()); - $this->assertSame('Attended school (in months)', $columns[19]->title()); - $this->assertSame('Can read', $columns[20]->title()); - $this->assertSame('Can write', $columns[21]->title()); - $this->assertSame('Can speak English', $columns[22]->title()); - $this->assertSame('Owned or rented', $columns[23]->title()); - $this->assertSame('Owned free or mortgaged', $columns[24]->title()); - $this->assertSame('Farm or house', $columns[25]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); + $this->assertSame('Color or race', $columns[2]->title()); + $this->assertSame('Sex', $columns[3]->title()); + $this->assertSame('Month of birth', $columns[4]->title()); + $this->assertSame('Year of birth', $columns[5]->title()); + $this->assertSame('Age at last birthday', $columns[6]->title()); + $this->assertSame('Whether single, married, widowed, or divorced', $columns[7]->title()); + $this->assertSame('Number of years married', $columns[8]->title()); + $this->assertSame('Mother of how many children', $columns[9]->title()); + $this->assertSame('Number of these children living', $columns[10]->title()); + $this->assertSame('Place of birth of this person', $columns[11]->title()); + $this->assertSame('Place of birth of father of this person', $columns[12]->title()); + $this->assertSame('Place of birth of mother of this person', $columns[13]->title()); + $this->assertSame('Year of immigration to the United States', $columns[14]->title()); + $this->assertSame('Number of years in the United States', $columns[15]->title()); + $this->assertSame('Naturalization', $columns[16]->title()); + $this->assertSame('Occupation, trade of profession', $columns[17]->title()); + $this->assertSame('Months not unemployed', $columns[18]->title()); + $this->assertSame('Attended school (in months)', $columns[19]->title()); + $this->assertSame('Can read', $columns[20]->title()); + $this->assertSame('Can write', $columns[21]->title()); + $this->assertSame('Can speak English', $columns[22]->title()); + $this->assertSame('Owned or rented', $columns[23]->title()); + $this->assertSame('Owned free or mortgaged', $columns[24]->title()); + $this->assertSame('Farm or house', $columns[25]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1910Test.php b/tests/app/Census/CensusOfUnitedStates1910Test.php index d1a14f0e73..3652dc04db 100644 --- a/tests/app/Census/CensusOfUnitedStates1910Test.php +++ b/tests/app/Census/CensusOfUnitedStates1910Test.php @@ -19,118 +19,121 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1910 */ -class CensusOfUnitedStates1910Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1910 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1910; +class CensusOfUnitedStates1910Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1910 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1910; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('15 APR 1910', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('15 APR 1910', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1910 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1910; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1910 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1910; + $columns = $census->columns(); - $this->assertCount(29, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); + $this->assertCount(29, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[28]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Sex', $columns[2]->abbreviation()); - $this->assertSame('Race', $columns[3]->abbreviation()); - $this->assertSame('Age', $columns[4]->abbreviation()); - $this->assertSame('Cond', $columns[5]->abbreviation()); - $this->assertSame('Marr', $columns[6]->abbreviation()); - $this->assertSame('Chil', $columns[7]->abbreviation()); - $this->assertSame('Chil', $columns[8]->abbreviation()); - $this->assertSame('BP', $columns[9]->abbreviation()); - $this->assertSame('FBP', $columns[10]->abbreviation()); - $this->assertSame('MBP', $columns[11]->abbreviation()); - $this->assertSame('Imm', $columns[12]->abbreviation()); - $this->assertSame('Nat', $columns[13]->abbreviation()); - $this->assertSame('Lang', $columns[14]->abbreviation()); - $this->assertSame('Occupation', $columns[15]->abbreviation()); - $this->assertSame('Ind', $columns[16]->abbreviation()); - $this->assertSame('Emp', $columns[17]->abbreviation()); - $this->assertSame('Unemp', $columns[18]->abbreviation()); - $this->assertSame('Unemp', $columns[19]->abbreviation()); - $this->assertSame('R', $columns[20]->abbreviation()); - $this->assertSame('W', $columns[21]->abbreviation()); - $this->assertSame('Sch', $columns[22]->abbreviation()); - $this->assertSame('Home', $columns[23]->abbreviation()); - $this->assertSame('Mort', $columns[24]->abbreviation()); - $this->assertSame('Farm', $columns[25]->abbreviation()); - $this->assertSame('CW', $columns[26]->abbreviation()); - $this->assertSame('Blind', $columns[27]->abbreviation()); - $this->assertSame('Deaf', $columns[28]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Sex', $columns[2]->abbreviation()); + $this->assertSame('Race', $columns[3]->abbreviation()); + $this->assertSame('Age', $columns[4]->abbreviation()); + $this->assertSame('Cond', $columns[5]->abbreviation()); + $this->assertSame('Marr', $columns[6]->abbreviation()); + $this->assertSame('Chil', $columns[7]->abbreviation()); + $this->assertSame('Chil', $columns[8]->abbreviation()); + $this->assertSame('BP', $columns[9]->abbreviation()); + $this->assertSame('FBP', $columns[10]->abbreviation()); + $this->assertSame('MBP', $columns[11]->abbreviation()); + $this->assertSame('Imm', $columns[12]->abbreviation()); + $this->assertSame('Nat', $columns[13]->abbreviation()); + $this->assertSame('Lang', $columns[14]->abbreviation()); + $this->assertSame('Occupation', $columns[15]->abbreviation()); + $this->assertSame('Ind', $columns[16]->abbreviation()); + $this->assertSame('Emp', $columns[17]->abbreviation()); + $this->assertSame('Unemp', $columns[18]->abbreviation()); + $this->assertSame('Unemp', $columns[19]->abbreviation()); + $this->assertSame('R', $columns[20]->abbreviation()); + $this->assertSame('W', $columns[21]->abbreviation()); + $this->assertSame('Sch', $columns[22]->abbreviation()); + $this->assertSame('Home', $columns[23]->abbreviation()); + $this->assertSame('Mort', $columns[24]->abbreviation()); + $this->assertSame('Farm', $columns[25]->abbreviation()); + $this->assertSame('CW', $columns[26]->abbreviation()); + $this->assertSame('Blind', $columns[27]->abbreviation()); + $this->assertSame('Deaf', $columns[28]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); - $this->assertSame('Sex', $columns[2]->title()); - $this->assertSame('Color or race', $columns[3]->title()); - $this->assertSame('Age at last birthday', $columns[4]->title()); - $this->assertSame('Whether single, married, widowed, or divorced', $columns[5]->title()); - $this->assertSame('Number of years of present marriage', $columns[6]->title()); - $this->assertSame('Mother of how many children', $columns[7]->title()); - $this->assertSame('Number of these children living', $columns[8]->title()); - $this->assertSame('Place of birth of this person', $columns[9]->title()); - $this->assertSame('Place of birth of father of this person', $columns[10]->title()); - $this->assertSame('Place of birth of mother of this person', $columns[11]->title()); - $this->assertSame('Year of immigration to the United States', $columns[12]->title()); - $this->assertSame('Whether naturalized or alien', $columns[13]->title()); - $this->assertSame('Whether able to speak English, of if not, give language spoken', $columns[14]->title()); - $this->assertSame('Trade or profession of, or particular kind of work done by this person', $columns[15]->title()); - $this->assertSame('General nature of industry', $columns[16]->title()); - $this->assertSame('Whether an employer, employee, or work on own account', $columns[17]->title()); - $this->assertSame('Whether out of work on April 15, 1910', $columns[18]->title()); - $this->assertSame('Number of weeks out of work in 1909', $columns[19]->title()); - $this->assertSame('Whether able to read', $columns[20]->title()); - $this->assertSame('Whether able to write', $columns[21]->title()); - $this->assertSame('Attended school since September 1, 1909', $columns[22]->title()); - $this->assertSame('Owned or rented', $columns[23]->title()); - $this->assertSame('Owned free or mortgaged', $columns[24]->title()); - $this->assertSame('Farm or house', $columns[25]->title()); - $this->assertSame('Whether a survivor of the Union or Confederate Army or Navy', $columns[26]->title()); - $this->assertSame('Whether blind (both eyes)', $columns[27]->title()); - $this->assertSame('Whether deaf and dumb', $columns[28]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); + $this->assertSame('Sex', $columns[2]->title()); + $this->assertSame('Color or race', $columns[3]->title()); + $this->assertSame('Age at last birthday', $columns[4]->title()); + $this->assertSame('Whether single, married, widowed, or divorced', $columns[5]->title()); + $this->assertSame('Number of years of present marriage', $columns[6]->title()); + $this->assertSame('Mother of how many children', $columns[7]->title()); + $this->assertSame('Number of these children living', $columns[8]->title()); + $this->assertSame('Place of birth of this person', $columns[9]->title()); + $this->assertSame('Place of birth of father of this person', $columns[10]->title()); + $this->assertSame('Place of birth of mother of this person', $columns[11]->title()); + $this->assertSame('Year of immigration to the United States', $columns[12]->title()); + $this->assertSame('Whether naturalized or alien', $columns[13]->title()); + $this->assertSame('Whether able to speak English, of if not, give language spoken', $columns[14]->title()); + $this->assertSame('Trade or profession of, or particular kind of work done by this person', $columns[15]->title()); + $this->assertSame('General nature of industry', $columns[16]->title()); + $this->assertSame('Whether an employer, employee, or work on own account', $columns[17]->title()); + $this->assertSame('Whether out of work on April 15, 1910', $columns[18]->title()); + $this->assertSame('Number of weeks out of work in 1909', $columns[19]->title()); + $this->assertSame('Whether able to read', $columns[20]->title()); + $this->assertSame('Whether able to write', $columns[21]->title()); + $this->assertSame('Attended school since September 1, 1909', $columns[22]->title()); + $this->assertSame('Owned or rented', $columns[23]->title()); + $this->assertSame('Owned free or mortgaged', $columns[24]->title()); + $this->assertSame('Farm or house', $columns[25]->title()); + $this->assertSame('Whether a survivor of the Union or Confederate Army or Navy', $columns[26]->title()); + $this->assertSame('Whether blind (both eyes)', $columns[27]->title()); + $this->assertSame('Whether deaf and dumb', $columns[28]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1920Test.php b/tests/app/Census/CensusOfUnitedStates1920Test.php index 97619eadde..db373ac734 100644 --- a/tests/app/Census/CensusOfUnitedStates1920Test.php +++ b/tests/app/Census/CensusOfUnitedStates1920Test.php @@ -19,103 +19,106 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1920 */ -class CensusOfUnitedStates1920Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1920 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1920; +class CensusOfUnitedStates1920Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1920 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1920; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('JAN 1920', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('JAN 1920', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1920 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1920; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1920 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1920; + $columns = $census->columns(); - $this->assertCount(24, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertCount(24, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNameInitial', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Home', $columns[2]->abbreviation()); - $this->assertSame('Mort', $columns[3]->abbreviation()); - $this->assertSame('Sex', $columns[4]->abbreviation()); - $this->assertSame('Race', $columns[5]->abbreviation()); - $this->assertSame('Age', $columns[6]->abbreviation()); - $this->assertSame('Condition', $columns[7]->abbreviation()); - $this->assertSame('Imm', $columns[8]->abbreviation()); - $this->assertSame('Nat', $columns[9]->abbreviation()); - $this->assertSame('NatY', $columns[10]->abbreviation()); - $this->assertSame('School', $columns[11]->abbreviation()); - $this->assertSame('R', $columns[12]->abbreviation()); - $this->assertSame('W', $columns[13]->abbreviation()); - $this->assertSame('BP', $columns[14]->abbreviation()); - $this->assertSame('Lang', $columns[15]->abbreviation()); - $this->assertSame('FBP', $columns[16]->abbreviation()); - $this->assertSame('Father lang', $columns[17]->abbreviation()); - $this->assertSame('MBP', $columns[18]->abbreviation()); - $this->assertSame('Mother lang', $columns[19]->abbreviation()); - $this->assertSame('Eng', $columns[20]->abbreviation()); - $this->assertSame('Occupation', $columns[21]->abbreviation()); - $this->assertSame('Ind', $columns[22]->abbreviation()); - $this->assertSame('Emp', $columns[23]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Home', $columns[2]->abbreviation()); + $this->assertSame('Mort', $columns[3]->abbreviation()); + $this->assertSame('Sex', $columns[4]->abbreviation()); + $this->assertSame('Race', $columns[5]->abbreviation()); + $this->assertSame('Age', $columns[6]->abbreviation()); + $this->assertSame('Condition', $columns[7]->abbreviation()); + $this->assertSame('Imm', $columns[8]->abbreviation()); + $this->assertSame('Nat', $columns[9]->abbreviation()); + $this->assertSame('NatY', $columns[10]->abbreviation()); + $this->assertSame('School', $columns[11]->abbreviation()); + $this->assertSame('R', $columns[12]->abbreviation()); + $this->assertSame('W', $columns[13]->abbreviation()); + $this->assertSame('BP', $columns[14]->abbreviation()); + $this->assertSame('Lang', $columns[15]->abbreviation()); + $this->assertSame('FBP', $columns[16]->abbreviation()); + $this->assertSame('Father lang', $columns[17]->abbreviation()); + $this->assertSame('MBP', $columns[18]->abbreviation()); + $this->assertSame('Mother lang', $columns[19]->abbreviation()); + $this->assertSame('Eng', $columns[20]->abbreviation()); + $this->assertSame('Occupation', $columns[21]->abbreviation()); + $this->assertSame('Ind', $columns[22]->abbreviation()); + $this->assertSame('Emp', $columns[23]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); - $this->assertSame('Owned or rented', $columns[2]->title()); - $this->assertSame('If owned, free or mortgaged', $columns[3]->title()); - $this->assertSame('Sex', $columns[4]->title()); - $this->assertSame('Color or race', $columns[5]->title()); - $this->assertSame('Age at last birthday', $columns[6]->title()); - $this->assertSame('Whether single, married, widowed, or divorced', $columns[7]->title()); - $this->assertSame('Year of immigration to the United States', $columns[8]->title()); - $this->assertSame('Naturalized or alien', $columns[9]->title()); - $this->assertSame('If naturalized, year of naturalization', $columns[10]->title()); - $this->assertSame('Attended school since Sept. 1, 1919', $columns[11]->title()); - $this->assertSame('Whether able to read', $columns[12]->title()); - $this->assertSame('Whether able to write', $columns[13]->title()); - $this->assertSame('Place of birth', $columns[14]->title()); - $this->assertSame('Mother tongue', $columns[15]->title()); - $this->assertSame('Place of birth of father', $columns[16]->title()); - $this->assertSame('Mother tongue of father', $columns[17]->title()); - $this->assertSame('Place of birth of mother', $columns[18]->title()); - $this->assertSame('Mother tongue of mother', $columns[19]->title()); - $this->assertSame('Whether able to speak English', $columns[20]->title()); - $this->assertSame('Trade, profession, or particular kind of work done', $columns[21]->title()); - $this->assertSame('Industry, business of establishment in which at work', $columns[22]->title()); - $this->assertSame('Employer, salary or wage worker, or work on own account', $columns[23]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); + $this->assertSame('Owned or rented', $columns[2]->title()); + $this->assertSame('If owned, free or mortgaged', $columns[3]->title()); + $this->assertSame('Sex', $columns[4]->title()); + $this->assertSame('Color or race', $columns[5]->title()); + $this->assertSame('Age at last birthday', $columns[6]->title()); + $this->assertSame('Whether single, married, widowed, or divorced', $columns[7]->title()); + $this->assertSame('Year of immigration to the United States', $columns[8]->title()); + $this->assertSame('Naturalized or alien', $columns[9]->title()); + $this->assertSame('If naturalized, year of naturalization', $columns[10]->title()); + $this->assertSame('Attended school since Sept. 1, 1919', $columns[11]->title()); + $this->assertSame('Whether able to read', $columns[12]->title()); + $this->assertSame('Whether able to write', $columns[13]->title()); + $this->assertSame('Place of birth', $columns[14]->title()); + $this->assertSame('Mother tongue', $columns[15]->title()); + $this->assertSame('Place of birth of father', $columns[16]->title()); + $this->assertSame('Mother tongue of father', $columns[17]->title()); + $this->assertSame('Place of birth of mother', $columns[18]->title()); + $this->assertSame('Mother tongue of mother', $columns[19]->title()); + $this->assertSame('Whether able to speak English', $columns[20]->title()); + $this->assertSame('Trade, profession, or particular kind of work done', $columns[21]->title()); + $this->assertSame('Industry, business of establishment in which at work', $columns[22]->title()); + $this->assertSame('Employer, salary or wage worker, or work on own account', $columns[23]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1930Test.php b/tests/app/Census/CensusOfUnitedStates1930Test.php index effef338fe..b80915f8a4 100644 --- a/tests/app/Census/CensusOfUnitedStates1930Test.php +++ b/tests/app/Census/CensusOfUnitedStates1930Test.php @@ -19,115 +19,118 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1930 */ -class CensusOfUnitedStates1930Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1930 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1930; +class CensusOfUnitedStates1930Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1930 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1930; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('APR 1930', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('APR 1930', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1930 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1930; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1930 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1930; + $columns = $census->columns(); - $this->assertCount(28, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMarried', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); + $this->assertCount(28, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMarried', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[27]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Home', $columns[2]->abbreviation()); - $this->assertSame('V/R', $columns[3]->abbreviation()); - $this->assertSame('Radio', $columns[4]->abbreviation()); - $this->assertSame('Farm', $columns[5]->abbreviation()); - $this->assertSame('Sex', $columns[6]->abbreviation()); - $this->assertSame('Race', $columns[7]->abbreviation()); - $this->assertSame('Age', $columns[8]->abbreviation()); - $this->assertSame('Cond', $columns[9]->abbreviation()); - $this->assertSame('AM', $columns[10]->abbreviation()); - $this->assertSame('School', $columns[11]->abbreviation()); - $this->assertSame('R/W', $columns[12]->abbreviation()); - $this->assertSame('BP', $columns[13]->abbreviation()); - $this->assertSame('FBP', $columns[14]->abbreviation()); - $this->assertSame('MBP', $columns[15]->abbreviation()); - $this->assertSame('Lang', $columns[16]->abbreviation()); - $this->assertSame('Imm', $columns[17]->abbreviation()); - $this->assertSame('Nat', $columns[18]->abbreviation()); - $this->assertSame('Eng', $columns[19]->abbreviation()); - $this->assertSame('Occupation', $columns[20]->abbreviation()); - $this->assertSame('Industry', $columns[21]->abbreviation()); - $this->assertSame('Code', $columns[22]->abbreviation()); - $this->assertSame('Emp', $columns[23]->abbreviation()); - $this->assertSame('Work', $columns[24]->abbreviation()); - $this->assertSame('Unemp', $columns[25]->abbreviation()); - $this->assertSame('Vet', $columns[26]->abbreviation()); - $this->assertSame('War', $columns[27]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Home', $columns[2]->abbreviation()); + $this->assertSame('V/R', $columns[3]->abbreviation()); + $this->assertSame('Radio', $columns[4]->abbreviation()); + $this->assertSame('Farm', $columns[5]->abbreviation()); + $this->assertSame('Sex', $columns[6]->abbreviation()); + $this->assertSame('Race', $columns[7]->abbreviation()); + $this->assertSame('Age', $columns[8]->abbreviation()); + $this->assertSame('Cond', $columns[9]->abbreviation()); + $this->assertSame('AM', $columns[10]->abbreviation()); + $this->assertSame('School', $columns[11]->abbreviation()); + $this->assertSame('R/W', $columns[12]->abbreviation()); + $this->assertSame('BP', $columns[13]->abbreviation()); + $this->assertSame('FBP', $columns[14]->abbreviation()); + $this->assertSame('MBP', $columns[15]->abbreviation()); + $this->assertSame('Lang', $columns[16]->abbreviation()); + $this->assertSame('Imm', $columns[17]->abbreviation()); + $this->assertSame('Nat', $columns[18]->abbreviation()); + $this->assertSame('Eng', $columns[19]->abbreviation()); + $this->assertSame('Occupation', $columns[20]->abbreviation()); + $this->assertSame('Industry', $columns[21]->abbreviation()); + $this->assertSame('Code', $columns[22]->abbreviation()); + $this->assertSame('Emp', $columns[23]->abbreviation()); + $this->assertSame('Work', $columns[24]->abbreviation()); + $this->assertSame('Unemp', $columns[25]->abbreviation()); + $this->assertSame('Vet', $columns[26]->abbreviation()); + $this->assertSame('War', $columns[27]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); - $this->assertSame('Home owned or rented', $columns[2]->title()); - $this->assertSame('Value of house, if owned, or monthly rental if rented', $columns[3]->title()); - $this->assertSame('Radio set', $columns[4]->title()); - $this->assertSame('Does this family live on a farm', $columns[5]->title()); - $this->assertSame('Sex', $columns[6]->title()); - $this->assertSame('Color or race', $columns[7]->title()); - $this->assertSame('Age at last birthday', $columns[8]->title()); - $this->assertSame('Whether single, married, widowed, or divorced', $columns[9]->title()); - $this->assertSame('Age at first marriage', $columns[10]->title()); - $this->assertSame('Attended school since Sept. 1, 1929', $columns[11]->title()); - $this->assertSame('Whether able to read and write', $columns[12]->title()); - $this->assertSame('Place of birth', $columns[13]->title()); - $this->assertSame('Place of birth of father', $columns[14]->title()); - $this->assertSame('Place of birth of mother', $columns[15]->title()); - $this->assertSame('Language spoken in home before coming to the United States', $columns[16]->title()); - $this->assertSame('Year of immigration to the United States', $columns[17]->title()); - $this->assertSame('Naturalization', $columns[18]->title()); - $this->assertSame('Whether able to speak English', $columns[19]->title()); - $this->assertSame('Trade, profession, or particular kind of work done', $columns[20]->title()); - $this->assertSame('Industry, business of establishment in which at work', $columns[21]->title()); - $this->assertSame('Industry code', $columns[22]->title()); - $this->assertSame('Class of worker', $columns[23]->title()); - $this->assertSame('Whether normally at work yesterday or the last regular working day', $columns[24]->title()); - $this->assertSame('If not, …', $columns[25]->title()); - $this->assertSame('Whether a veteran of U.S. military or …', $columns[26]->title()); - $this->assertSame('What war or …', $columns[27]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); + $this->assertSame('Home owned or rented', $columns[2]->title()); + $this->assertSame('Value of house, if owned, or monthly rental if rented', $columns[3]->title()); + $this->assertSame('Radio set', $columns[4]->title()); + $this->assertSame('Does this family live on a farm', $columns[5]->title()); + $this->assertSame('Sex', $columns[6]->title()); + $this->assertSame('Color or race', $columns[7]->title()); + $this->assertSame('Age at last birthday', $columns[8]->title()); + $this->assertSame('Whether single, married, widowed, or divorced', $columns[9]->title()); + $this->assertSame('Age at first marriage', $columns[10]->title()); + $this->assertSame('Attended school since Sept. 1, 1929', $columns[11]->title()); + $this->assertSame('Whether able to read and write', $columns[12]->title()); + $this->assertSame('Place of birth', $columns[13]->title()); + $this->assertSame('Place of birth of father', $columns[14]->title()); + $this->assertSame('Place of birth of mother', $columns[15]->title()); + $this->assertSame('Language spoken in home before coming to the United States', $columns[16]->title()); + $this->assertSame('Year of immigration to the United States', $columns[17]->title()); + $this->assertSame('Naturalization', $columns[18]->title()); + $this->assertSame('Whether able to speak English', $columns[19]->title()); + $this->assertSame('Trade, profession, or particular kind of work done', $columns[20]->title()); + $this->assertSame('Industry, business of establishment in which at work', $columns[21]->title()); + $this->assertSame('Industry code', $columns[22]->title()); + $this->assertSame('Class of worker', $columns[23]->title()); + $this->assertSame('Whether normally at work yesterday or the last regular working day', $columns[24]->title()); + $this->assertSame('If not, …', $columns[25]->title()); + $this->assertSame('Whether a veteran of U.S. military or …', $columns[26]->title()); + $this->assertSame('What war or …', $columns[27]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStates1940Test.php b/tests/app/Census/CensusOfUnitedStates1940Test.php index c66f028264..4e6f2db54d 100644 --- a/tests/app/Census/CensusOfUnitedStates1940Test.php +++ b/tests/app/Census/CensusOfUnitedStates1940Test.php @@ -19,112 +19,115 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates1940 */ -class CensusOfUnitedStates1940Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1940 - */ - public function testPlaceAndDate() { - $census = new CensusOfUnitedStates1940; +class CensusOfUnitedStates1940Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1940 + */ + public function testPlaceAndDate() + { + $census = new CensusOfUnitedStates1940; - $this->assertSame('United States', $census->censusPlace()); - $this->assertSame('APR 1940', $census->censusDate()); - } + $this->assertSame('United States', $census->censusPlace()); + $this->assertSame('APR 1940', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1940 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfUnitedStates1940; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates1940 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfUnitedStates1940; + $columns = $census->columns(); - $this->assertCount(27, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMarried', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[19]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); + $this->assertCount(27, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAge', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionUs', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMarried', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlaceSimple', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFatherBirthPlaceSimple', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnMotherBirthPlaceSimple', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[17]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[18]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[19]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[20]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[21]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[22]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[23]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[24]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[25]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[26]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Home', $columns[2]->abbreviation()); - $this->assertSame('V/R', $columns[3]->abbreviation()); - $this->assertSame('Farm', $columns[4]->abbreviation()); - $this->assertSame('Sex', $columns[5]->abbreviation()); - $this->assertSame('Race', $columns[6]->abbreviation()); - $this->assertSame('Age', $columns[7]->abbreviation()); - $this->assertSame('Cond', $columns[8]->abbreviation()); - $this->assertSame('AM', $columns[9]->abbreviation()); - $this->assertSame('School', $columns[10]->abbreviation()); - $this->assertSame('R/W', $columns[11]->abbreviation()); - $this->assertSame('BP', $columns[12]->abbreviation()); - $this->assertSame('FBP', $columns[13]->abbreviation()); - $this->assertSame('MBP', $columns[14]->abbreviation()); - $this->assertSame('Lang', $columns[15]->abbreviation()); - $this->assertSame('Imm', $columns[16]->abbreviation()); - $this->assertSame('Nat', $columns[17]->abbreviation()); - $this->assertSame('Eng', $columns[18]->abbreviation()); - $this->assertSame('Occupation', $columns[19]->abbreviation()); - $this->assertSame('Industry', $columns[20]->abbreviation()); - $this->assertSame('Code', $columns[21]->abbreviation()); - $this->assertSame('Emp', $columns[22]->abbreviation()); - $this->assertSame('Work', $columns[23]->abbreviation()); - $this->assertSame('Unemp', $columns[24]->abbreviation()); - $this->assertSame('Vet', $columns[25]->abbreviation()); - $this->assertSame('War', $columns[26]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Home', $columns[2]->abbreviation()); + $this->assertSame('V/R', $columns[3]->abbreviation()); + $this->assertSame('Farm', $columns[4]->abbreviation()); + $this->assertSame('Sex', $columns[5]->abbreviation()); + $this->assertSame('Race', $columns[6]->abbreviation()); + $this->assertSame('Age', $columns[7]->abbreviation()); + $this->assertSame('Cond', $columns[8]->abbreviation()); + $this->assertSame('AM', $columns[9]->abbreviation()); + $this->assertSame('School', $columns[10]->abbreviation()); + $this->assertSame('R/W', $columns[11]->abbreviation()); + $this->assertSame('BP', $columns[12]->abbreviation()); + $this->assertSame('FBP', $columns[13]->abbreviation()); + $this->assertSame('MBP', $columns[14]->abbreviation()); + $this->assertSame('Lang', $columns[15]->abbreviation()); + $this->assertSame('Imm', $columns[16]->abbreviation()); + $this->assertSame('Nat', $columns[17]->abbreviation()); + $this->assertSame('Eng', $columns[18]->abbreviation()); + $this->assertSame('Occupation', $columns[19]->abbreviation()); + $this->assertSame('Industry', $columns[20]->abbreviation()); + $this->assertSame('Code', $columns[21]->abbreviation()); + $this->assertSame('Emp', $columns[22]->abbreviation()); + $this->assertSame('Work', $columns[23]->abbreviation()); + $this->assertSame('Unemp', $columns[24]->abbreviation()); + $this->assertSame('Vet', $columns[25]->abbreviation()); + $this->assertSame('War', $columns[26]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); - $this->assertSame('Home owned or rented', $columns[2]->title()); - $this->assertSame('Value of house, if owned, or monthly rental if rented', $columns[3]->title()); - $this->assertSame('Does this family live on a farm', $columns[4]->title()); - $this->assertSame('Sex', $columns[5]->title()); - $this->assertSame('Color or race', $columns[6]->title()); - $this->assertSame('Age at last birthday', $columns[7]->title()); - $this->assertSame('Whether single, married, widowed, or divorced', $columns[8]->title()); - $this->assertSame('Age at first marriage', $columns[9]->title()); - $this->assertSame('Attended school since Sept. 1, 1929', $columns[10]->title()); - $this->assertSame('Whether able to read and write', $columns[11]->title()); - $this->assertSame('Place of birth', $columns[12]->title()); - $this->assertSame('Place of birth of father', $columns[13]->title()); - $this->assertSame('Place of birth of mother', $columns[14]->title()); - $this->assertSame('Language spoken in home before coming to the United States', $columns[15]->title()); - $this->assertSame('Year of immigration to the United States', $columns[16]->title()); - $this->assertSame('Naturalization', $columns[17]->title()); - $this->assertSame('Whether able to speak English', $columns[18]->title()); - $this->assertSame('Trade, profession, or particular kind of work done', $columns[19]->title()); - $this->assertSame('Industry, business of establishment in which at work', $columns[20]->title()); - $this->assertSame('Industry code', $columns[21]->title()); - $this->assertSame('Class of worker', $columns[22]->title()); - $this->assertSame('Whether normally at work yesterday or the last regular working day', $columns[23]->title()); - $this->assertSame('If not, …', $columns[24]->title()); - $this->assertSame('Whether a veteran of U.S. military or …', $columns[25]->title()); - $this->assertSame('What war or …', $columns[26]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Relationship of each person to the head of the family', $columns[1]->title()); + $this->assertSame('Home owned or rented', $columns[2]->title()); + $this->assertSame('Value of house, if owned, or monthly rental if rented', $columns[3]->title()); + $this->assertSame('Does this family live on a farm', $columns[4]->title()); + $this->assertSame('Sex', $columns[5]->title()); + $this->assertSame('Color or race', $columns[6]->title()); + $this->assertSame('Age at last birthday', $columns[7]->title()); + $this->assertSame('Whether single, married, widowed, or divorced', $columns[8]->title()); + $this->assertSame('Age at first marriage', $columns[9]->title()); + $this->assertSame('Attended school since Sept. 1, 1929', $columns[10]->title()); + $this->assertSame('Whether able to read and write', $columns[11]->title()); + $this->assertSame('Place of birth', $columns[12]->title()); + $this->assertSame('Place of birth of father', $columns[13]->title()); + $this->assertSame('Place of birth of mother', $columns[14]->title()); + $this->assertSame('Language spoken in home before coming to the United States', $columns[15]->title()); + $this->assertSame('Year of immigration to the United States', $columns[16]->title()); + $this->assertSame('Naturalization', $columns[17]->title()); + $this->assertSame('Whether able to speak English', $columns[18]->title()); + $this->assertSame('Trade, profession, or particular kind of work done', $columns[19]->title()); + $this->assertSame('Industry, business of establishment in which at work', $columns[20]->title()); + $this->assertSame('Industry code', $columns[21]->title()); + $this->assertSame('Class of worker', $columns[22]->title()); + $this->assertSame('Whether normally at work yesterday or the last regular working day', $columns[23]->title()); + $this->assertSame('If not, …', $columns[24]->title()); + $this->assertSame('Whether a veteran of U.S. military or …', $columns[25]->title()); + $this->assertSame('What war or …', $columns[26]->title()); + } } diff --git a/tests/app/Census/CensusOfUnitedStatesTest.php b/tests/app/Census/CensusOfUnitedStatesTest.php index eccb84ec50..292c7fedec 100644 --- a/tests/app/Census/CensusOfUnitedStatesTest.php +++ b/tests/app/Census/CensusOfUnitedStatesTest.php @@ -19,44 +19,47 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfUnitedStates */ -class CensusOfUnitedStatesTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates - */ - public function testPlace() { - $census = new CensusOfUnitedStates; +class CensusOfUnitedStatesTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates + */ + public function testPlace() + { + $census = new CensusOfUnitedStates; - $this->assertSame('United States', $census->censusPlace()); - } + $this->assertSame('United States', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates - */ - public function testAllDates() { - $census = new CensusOfUnitedStates; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfUnitedStates + */ + public function testAllDates() + { + $census = new CensusOfUnitedStates; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(16, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1790', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1800', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1810', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1820', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1830', $census_dates[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1840', $census_dates[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1850', $census_dates[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1860', $census_dates[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1870', $census_dates[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1880', $census_dates[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1890', $census_dates[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1900', $census_dates[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1910', $census_dates[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1920', $census_dates[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1930', $census_dates[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1940', $census_dates[15]); - } + $this->assertCount(16, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1790', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1800', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1810', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1820', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1830', $census_dates[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1840', $census_dates[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1850', $census_dates[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1860', $census_dates[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1870', $census_dates[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1880', $census_dates[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1890', $census_dates[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1900', $census_dates[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1910', $census_dates[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1920', $census_dates[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1930', $census_dates[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates1940', $census_dates[15]); + } } diff --git a/tests/app/Census/CensusOfWales1841Test.php b/tests/app/Census/CensusOfWales1841Test.php index 7c3d298108..0d2732578d 100644 --- a/tests/app/Census/CensusOfWales1841Test.php +++ b/tests/app/Census/CensusOfWales1841Test.php @@ -19,49 +19,52 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1841 */ -class CensusOfWales1841Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1841 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1841; +class CensusOfWales1841Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1841 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1841; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('06 JUN 1841', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('06 JUN 1841', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1841 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1841; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1841 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1841; + $columns = $census->columns(); - $this->assertCount(6, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBornForeignParts', $columns[5]); + $this->assertCount(6, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale5Years', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale5Years', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBornForeignParts', $columns[5]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('AgeM', $columns[1]->abbreviation()); - $this->assertSame('AgeF', $columns[2]->abbreviation()); - $this->assertSame('Occupation', $columns[3]->abbreviation()); - $this->assertSame('BiC', $columns[4]->abbreviation()); - $this->assertSame('SIF', $columns[5]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('AgeM', $columns[1]->abbreviation()); + $this->assertSame('AgeF', $columns[2]->abbreviation()); + $this->assertSame('Occupation', $columns[3]->abbreviation()); + $this->assertSame('BiC', $columns[4]->abbreviation()); + $this->assertSame('SIF', $columns[5]->abbreviation()); - $this->assertSame('Name', $columns[0]->title()); - $this->assertSame('Age (males)', $columns[1]->title()); - $this->assertSame('Age (females)', $columns[2]->title()); - $this->assertSame('Profession, trade, employment or of independent means', $columns[3]->title()); - $this->assertSame('Born in same county', $columns[4]->title()); - $this->assertSame('Born in Scotland, Ireland or foreign parts', $columns[5]->title()); - } + $this->assertSame('Name', $columns[0]->title()); + $this->assertSame('Age (males)', $columns[1]->title()); + $this->assertSame('Age (females)', $columns[2]->title()); + $this->assertSame('Profession, trade, employment or of independent means', $columns[3]->title()); + $this->assertSame('Born in same county', $columns[4]->title()); + $this->assertSame('Born in Scotland, Ireland or foreign parts', $columns[5]->title()); + } } diff --git a/tests/app/Census/CensusOfWales1851Test.php b/tests/app/Census/CensusOfWales1851Test.php index 2039978d38..0914bf6d0b 100644 --- a/tests/app/Census/CensusOfWales1851Test.php +++ b/tests/app/Census/CensusOfWales1851Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1851 */ -class CensusOfWales1851Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1851 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1851; +class CensusOfWales1851Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1851 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1851; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('30 MAR 1851', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('30 MAR 1851', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1851 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1851; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1851 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1851; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfWales1861Test.php b/tests/app/Census/CensusOfWales1861Test.php index 2f4c1b16fa..9e8751f50b 100644 --- a/tests/app/Census/CensusOfWales1861Test.php +++ b/tests/app/Census/CensusOfWales1861Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1861 */ -class CensusOfWales1861Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1861 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1861; +class CensusOfWales1861Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1861 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1861; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('07 APR 1861', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('07 APR 1861', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1861 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1861; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1861 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1861; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether blind or deaf-and-dumb', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfWales1871Test.php b/tests/app/Census/CensusOfWales1871Test.php index dfc8606d8e..be6dc8f380 100644 --- a/tests/app/Census/CensusOfWales1871Test.php +++ b/tests/app/Census/CensusOfWales1871Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1871 */ -class CensusOfWales1871Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1871 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1871; +class CensusOfWales1871Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1871 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1871; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('02 APR 1871', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('02 APR 1871', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1871 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1871; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1871 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1871; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfWales1881Test.php b/tests/app/Census/CensusOfWales1881Test.php index eb9eff55f2..af89b43a43 100644 --- a/tests/app/Census/CensusOfWales1881Test.php +++ b/tests/app/Census/CensusOfWales1881Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1881 */ -class CensusOfWales1881Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1881 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1881; +class CensusOfWales1881Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1881 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1881; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('03 APR 1881', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('03 APR 1881', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1881 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1881; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1881 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1881; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Birthplace', $columns[6]->abbreviation()); - $this->assertSame('Infirm', $columns[7]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Birthplace', $columns[6]->abbreviation()); + $this->assertSame('Infirm', $columns[7]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Where born', $columns[6]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Where born', $columns[6]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, imbecile, idiot or lunatic', $columns[7]->title()); + } } diff --git a/tests/app/Census/CensusOfWales1891Test.php b/tests/app/Census/CensusOfWales1891Test.php index 5c1aae761e..01fecefb9c 100644 --- a/tests/app/Census/CensusOfWales1891Test.php +++ b/tests/app/Census/CensusOfWales1891Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1891 */ -class CensusOfWales1891Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1891 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1891; +class CensusOfWales1891Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1891 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1891; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('05 APR 1891', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('05 APR 1891', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1891 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1891; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1891 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1891; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Empl', $columns[6]->abbreviation()); - $this->assertSame('Empd', $columns[7]->abbreviation()); - $this->assertSame('OAC', $columns[8]->abbreviation()); - $this->assertSame('Birthplace', $columns[9]->abbreviation()); - $this->assertSame('Infirm', $columns[10]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Empl', $columns[6]->abbreviation()); + $this->assertSame('Empd', $columns[7]->abbreviation()); + $this->assertSame('OAC', $columns[8]->abbreviation()); + $this->assertSame('Birthplace', $columns[9]->abbreviation()); + $this->assertSame('Infirm', $columns[10]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Employer', $columns[6]->title()); - $this->assertSame('Employed', $columns[7]->title()); - $this->assertSame('Own account', $columns[8]->title()); - $this->assertSame('Where born', $columns[9]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, lunatic or imbecile', $columns[10]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Employer', $columns[6]->title()); + $this->assertSame('Employed', $columns[7]->title()); + $this->assertSame('Own account', $columns[8]->title()); + $this->assertSame('Where born', $columns[9]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, lunatic or imbecile', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfWales1901Test.php b/tests/app/Census/CensusOfWales1901Test.php index ed4b087e4d..6fd6052b1f 100644 --- a/tests/app/Census/CensusOfWales1901Test.php +++ b/tests/app/Census/CensusOfWales1901Test.php @@ -19,64 +19,67 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1901 */ -class CensusOfWales1901Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1901 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1901; +class CensusOfWales1901Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1901 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1901; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('31 MAR 1901', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('31 MAR 1901', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1901 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1901; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1901 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1901; + $columns = $census->columns(); - $this->assertCount(11, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertCount(11, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('Condition', $columns[2]->abbreviation()); - $this->assertSame('AgeM', $columns[3]->abbreviation()); - $this->assertSame('AgeF', $columns[4]->abbreviation()); - $this->assertSame('Occupation', $columns[5]->abbreviation()); - $this->assertSame('Emp', $columns[6]->abbreviation()); - $this->assertSame('Home', $columns[7]->abbreviation()); - $this->assertSame('Birthplace', $columns[8]->abbreviation()); - $this->assertSame('Infirm', $columns[9]->abbreviation()); - $this->assertSame('Lang', $columns[10]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('Condition', $columns[2]->abbreviation()); + $this->assertSame('AgeM', $columns[3]->abbreviation()); + $this->assertSame('AgeF', $columns[4]->abbreviation()); + $this->assertSame('Occupation', $columns[5]->abbreviation()); + $this->assertSame('Emp', $columns[6]->abbreviation()); + $this->assertSame('Home', $columns[7]->abbreviation()); + $this->assertSame('Birthplace', $columns[8]->abbreviation()); + $this->assertSame('Infirm', $columns[9]->abbreviation()); + $this->assertSame('Lang', $columns[10]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Condition', $columns[2]->title()); - $this->assertSame('Age (males)', $columns[3]->title()); - $this->assertSame('Age (females)', $columns[4]->title()); - $this->assertSame('Rank, profession or occupation', $columns[5]->title()); - $this->assertSame('Employer, worker or own account', $columns[6]->title()); - $this->assertSame('Working at home', $columns[7]->title()); - $this->assertSame('Where born', $columns[8]->title()); - $this->assertSame('Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded', $columns[9]->title()); - $this->assertSame('Language spoken', $columns[10]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Condition', $columns[2]->title()); + $this->assertSame('Age (males)', $columns[3]->title()); + $this->assertSame('Age (females)', $columns[4]->title()); + $this->assertSame('Rank, profession or occupation', $columns[5]->title()); + $this->assertSame('Employer, worker or own account', $columns[6]->title()); + $this->assertSame('Working at home', $columns[7]->title()); + $this->assertSame('Where born', $columns[8]->title()); + $this->assertSame('Whether deaf-and-dumb, blind, lunatic, imbecile, feeble-minded', $columns[9]->title()); + $this->assertSame('Language spoken', $columns[10]->title()); + } } diff --git a/tests/app/Census/CensusOfWales1911Test.php b/tests/app/Census/CensusOfWales1911Test.php index eb4bc0ffb2..031d7cf531 100644 --- a/tests/app/Census/CensusOfWales1911Test.php +++ b/tests/app/Census/CensusOfWales1911Test.php @@ -19,82 +19,85 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales1911 */ -class CensusOfWales1911Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1911 - */ - public function testPlaceAndDate() { - $census = new CensusOfWales1911; +class CensusOfWales1911Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1911 + */ + public function testPlaceAndDate() + { + $census = new CensusOfWales1911; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('02 APR 1911', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('02 APR 1911', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales1911 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new CensusOfWales1911; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales1911 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new CensusOfWales1911; + $columns = $census->columns(); - $this->assertCount(17, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenDied', $columns[8]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[13]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[14]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); + $this->assertCount(17, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnFullName', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnRelationToHead', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeMale', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnAgeFemale', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnYearsMarried', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenBornAlive', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenLiving', $columns[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnChildrenDied', $columns[8]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[9]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[10]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[11]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[12]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthPlace', $columns[13]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNationality', $columns[14]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[15]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[16]); - $this->assertSame('Name', $columns[0]->abbreviation()); - $this->assertSame('Relation', $columns[1]->abbreviation()); - $this->assertSame('AgeM', $columns[2]->abbreviation()); - $this->assertSame('AgeF', $columns[3]->abbreviation()); - $this->assertSame('Condition', $columns[4]->abbreviation()); - $this->assertSame('YrM', $columns[5]->abbreviation()); - $this->assertSame('ChA', $columns[6]->abbreviation()); - $this->assertSame('ChL', $columns[7]->abbreviation()); - $this->assertSame('ChD', $columns[8]->abbreviation()); - $this->assertSame('Occupation', $columns[9]->abbreviation()); - $this->assertSame('Ind', $columns[10]->abbreviation()); - $this->assertSame('Emp', $columns[11]->abbreviation()); - $this->assertSame('Home', $columns[12]->abbreviation()); - $this->assertSame('Birthplace', $columns[13]->abbreviation()); - $this->assertSame('Nat', $columns[14]->abbreviation()); - $this->assertSame('Infirm', $columns[15]->abbreviation()); - $this->assertSame('Lang', $columns[16]->abbreviation()); + $this->assertSame('Name', $columns[0]->abbreviation()); + $this->assertSame('Relation', $columns[1]->abbreviation()); + $this->assertSame('AgeM', $columns[2]->abbreviation()); + $this->assertSame('AgeF', $columns[3]->abbreviation()); + $this->assertSame('Condition', $columns[4]->abbreviation()); + $this->assertSame('YrM', $columns[5]->abbreviation()); + $this->assertSame('ChA', $columns[6]->abbreviation()); + $this->assertSame('ChL', $columns[7]->abbreviation()); + $this->assertSame('ChD', $columns[8]->abbreviation()); + $this->assertSame('Occupation', $columns[9]->abbreviation()); + $this->assertSame('Ind', $columns[10]->abbreviation()); + $this->assertSame('Emp', $columns[11]->abbreviation()); + $this->assertSame('Home', $columns[12]->abbreviation()); + $this->assertSame('Birthplace', $columns[13]->abbreviation()); + $this->assertSame('Nat', $columns[14]->abbreviation()); + $this->assertSame('Infirm', $columns[15]->abbreviation()); + $this->assertSame('Lang', $columns[16]->abbreviation()); - $this->assertSame('Name and surname', $columns[0]->title()); - $this->assertSame('Relation to head of household', $columns[1]->title()); - $this->assertSame('Age (males)', $columns[2]->title()); - $this->assertSame('Age (females)', $columns[3]->title()); - $this->assertSame('Condition', $columns[4]->title()); - $this->assertSame('Years married', $columns[5]->title()); - $this->assertSame('Children born alive', $columns[6]->title()); - $this->assertSame('Children who are still alive', $columns[7]->title()); - $this->assertSame('Children who have died', $columns[8]->title()); - $this->assertSame('Rank, profession or occupation', $columns[9]->title()); - $this->assertSame('Industry', $columns[10]->title()); - $this->assertSame('Employer, worker or own account', $columns[11]->title()); - $this->assertSame('Working at home', $columns[12]->title()); - $this->assertSame('Where born', $columns[13]->title()); - $this->assertSame('Nationality', $columns[14]->title()); - $this->assertSame('Infirmity', $columns[15]->title()); - $this->assertSame('Language spoken', $columns[16]->title()); - } + $this->assertSame('Name and surname', $columns[0]->title()); + $this->assertSame('Relation to head of household', $columns[1]->title()); + $this->assertSame('Age (males)', $columns[2]->title()); + $this->assertSame('Age (females)', $columns[3]->title()); + $this->assertSame('Condition', $columns[4]->title()); + $this->assertSame('Years married', $columns[5]->title()); + $this->assertSame('Children born alive', $columns[6]->title()); + $this->assertSame('Children who are still alive', $columns[7]->title()); + $this->assertSame('Children who have died', $columns[8]->title()); + $this->assertSame('Rank, profession or occupation', $columns[9]->title()); + $this->assertSame('Industry', $columns[10]->title()); + $this->assertSame('Employer, worker or own account', $columns[11]->title()); + $this->assertSame('Working at home', $columns[12]->title()); + $this->assertSame('Where born', $columns[13]->title()); + $this->assertSame('Nationality', $columns[14]->title()); + $this->assertSame('Infirmity', $columns[15]->title()); + $this->assertSame('Language spoken', $columns[16]->title()); + } } diff --git a/tests/app/Census/CensusOfWalesTest.php b/tests/app/Census/CensusOfWalesTest.php index 99092a6015..3abbe36a6e 100644 --- a/tests/app/Census/CensusOfWalesTest.php +++ b/tests/app/Census/CensusOfWalesTest.php @@ -19,37 +19,40 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusOfWales */ -class CensusOfWalesTest extends \PHPUnit\Framework\TestCase { - /** - * Test the census place - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales - */ - public function testPlace() { - $census = new CensusOfWales; +class CensusOfWalesTest extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales + */ + public function testPlace() + { + $census = new CensusOfWales; - $this->assertSame('Wales', $census->censusPlace()); - } + $this->assertSame('Wales', $census->censusPlace()); + } - /** - * Test the census dates - * - * @covers \Fisharebest\Webtrees\Census\CensusOfWales - */ - public function testAllDates() { - $census = new CensusOfWales; + /** + * Test the census dates + * + * @covers \Fisharebest\Webtrees\Census\CensusOfWales + */ + public function testAllDates() + { + $census = new CensusOfWales; - $census_dates = $census->allCensusDates(); + $census_dates = $census->allCensusDates(); - $this->assertCount(9, $census_dates); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1841', $census_dates[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1851', $census_dates[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1861', $census_dates[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1871', $census_dates[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1881', $census_dates[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1891', $census_dates[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1901', $census_dates[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1911', $census_dates[7]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\RegisterOfWales1939', $census_dates[8]); - } + $this->assertCount(9, $census_dates); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1841', $census_dates[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1851', $census_dates[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1861', $census_dates[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1871', $census_dates[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1881', $census_dates[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1891', $census_dates[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1901', $census_dates[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales1911', $census_dates[7]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\RegisterOfWales1939', $census_dates[8]); + } } diff --git a/tests/app/Census/CensusTest.php b/tests/app/Census/CensusTest.php index 95e0589b81..9c227d734e 100644 --- a/tests/app/Census/CensusTest.php +++ b/tests/app/Census/CensusTest.php @@ -19,21 +19,23 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class CensusColumnAgeFemale5Years */ -class CensusTest extends \PHPUnit\Framework\TestCase { - /** - * @covers \Fisharebest\Webtrees\Census\Census - */ - public function testCensusPlaces() { - $censuses = Census::censusPlaces('XX'); +class CensusTest extends \PHPUnit\Framework\TestCase +{ + /** + * @covers \Fisharebest\Webtrees\Census\Census + */ + public function testCensusPlaces() + { + $censuses = Census::censusPlaces('XX'); - $this->assertCount(8, $censuses); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic', $censuses[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark', $censuses[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland', $censuses[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland', $censuses[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance', $censuses[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland', $censuses[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates', $censuses[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales', $censuses[7]); - } + $this->assertCount(8, $censuses); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfCzechRepublic', $censuses[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDenmark', $censuses[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfDeutschland', $censuses[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfEngland', $censuses[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfFrance', $censuses[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfScotland', $censuses[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfUnitedStates', $censuses[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusOfWales', $censuses[7]); + } } diff --git a/tests/app/Census/RegisterOfEngland1939Test.php b/tests/app/Census/RegisterOfEngland1939Test.php index 0a528ee2f2..f5da06ed79 100644 --- a/tests/app/Census/RegisterOfEngland1939Test.php +++ b/tests/app/Census/RegisterOfEngland1939Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class RegisterOfEngland1939 */ -class RegisterOfEngland1939Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\RegisterOfEngland1939 - */ - public function testPlaceAndDate() { - $census = new RegisterOfEngland1939; +class RegisterOfEngland1939Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\RegisterOfEngland1939 + */ + public function testPlaceAndDate() + { + $census = new RegisterOfEngland1939; - $this->assertSame('England', $census->censusPlace()); - $this->assertSame('29 SEP 1939', $census->censusDate()); - } + $this->assertSame('England', $census->censusPlace()); + $this->assertSame('29 SEP 1939', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\RegisterOfEngland1939 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new RegisterOfEngland1939; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\RegisterOfEngland1939 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new RegisterOfEngland1939; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDayMonthSlashYear', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDayMonthSlashYear', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); - $this->assertSame('Schedule', $columns[0]->abbreviation()); - $this->assertSame('SubNum', $columns[1]->abbreviation()); - $this->assertSame('Name', $columns[2]->abbreviation()); - $this->assertSame('Role', $columns[3]->abbreviation()); - $this->assertSame('Sex', $columns[4]->abbreviation()); - $this->assertSame('DOB', $columns[5]->abbreviation()); - $this->assertSame('MC', $columns[6]->abbreviation()); - $this->assertSame('Occupation', $columns[7]->abbreviation()); + $this->assertSame('Schedule', $columns[0]->abbreviation()); + $this->assertSame('SubNum', $columns[1]->abbreviation()); + $this->assertSame('Name', $columns[2]->abbreviation()); + $this->assertSame('Role', $columns[3]->abbreviation()); + $this->assertSame('Sex', $columns[4]->abbreviation()); + $this->assertSame('DOB', $columns[5]->abbreviation()); + $this->assertSame('MC', $columns[6]->abbreviation()); + $this->assertSame('Occupation', $columns[7]->abbreviation()); - $this->assertSame('Schedule Number', $columns[0]->title()); - $this->assertSame('Schedule Sub Number', $columns[1]->title()); - $this->assertSame('Surname & other names', $columns[2]->title()); - $this->assertSame('For institutions only – for example, Officer, Visitor, Servant, Patient, Inmate', $columns[3]->title()); - $this->assertSame('Male or Female', $columns[4]->title()); - $this->assertSame('Date of birth', $columns[5]->title()); - $this->assertSame('Marital Condition - Married, Single, Unmarried, Widowed or Divorced', $columns[6]->title()); - $this->assertSame('Occupation', $columns[7]->title()); - } + $this->assertSame('Schedule Number', $columns[0]->title()); + $this->assertSame('Schedule Sub Number', $columns[1]->title()); + $this->assertSame('Surname & other names', $columns[2]->title()); + $this->assertSame('For institutions only – for example, Officer, Visitor, Servant, Patient, Inmate', $columns[3]->title()); + $this->assertSame('Male or Female', $columns[4]->title()); + $this->assertSame('Date of birth', $columns[5]->title()); + $this->assertSame('Marital Condition - Married, Single, Unmarried, Widowed or Divorced', $columns[6]->title()); + $this->assertSame('Occupation', $columns[7]->title()); + } } diff --git a/tests/app/Census/RegisterOfWales1939Test.php b/tests/app/Census/RegisterOfWales1939Test.php index 859f278965..62ae50b4be 100644 --- a/tests/app/Census/RegisterOfWales1939Test.php +++ b/tests/app/Census/RegisterOfWales1939Test.php @@ -19,55 +19,58 @@ namespace Fisharebest\Webtrees\Census; /** * Test harness for the class RegisterOfWales1939 */ -class RegisterOfWales1939Test extends \PHPUnit\Framework\TestCase { - /** - * Test the census place and date - * - * @covers \Fisharebest\Webtrees\Census\RegisterOfWales1939 - */ - public function testPlaceAndDate() { - $census = new RegisterOfWales1939; +class RegisterOfWales1939Test extends \PHPUnit\Framework\TestCase +{ + /** + * Test the census place and date + * + * @covers \Fisharebest\Webtrees\Census\RegisterOfWales1939 + */ + public function testPlaceAndDate() + { + $census = new RegisterOfWales1939; - $this->assertSame('Wales', $census->censusPlace()); - $this->assertSame('29 SEP 1939', $census->censusDate()); - } + $this->assertSame('Wales', $census->censusPlace()); + $this->assertSame('29 SEP 1939', $census->censusDate()); + } - /** - * Test the census columns - * - * @covers \Fisharebest\Webtrees\Census\RegisterOfWales1939 - * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn - */ - public function testColumns() { - $census = new RegisterOfWales1939; - $columns = $census->columns(); + /** + * Test the census columns + * + * @covers \Fisharebest\Webtrees\Census\RegisterOfWales1939 + * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumn + */ + public function testColumns() + { + $census = new RegisterOfWales1939; + $columns = $census->columns(); - $this->assertCount(8, $columns); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[2]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[4]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDayMonthSlashYear', $columns[5]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[6]); - $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); + $this->assertCount(8, $columns); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[0]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[1]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSurnameGivenNames', $columns[2]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnNull', $columns[3]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnSexMF', $columns[4]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnBirthDayMonthSlashYear', $columns[5]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnConditionEnglish', $columns[6]); + $this->assertInstanceOf('Fisharebest\Webtrees\Census\CensusColumnOccupation', $columns[7]); - $this->assertSame('Schedule', $columns[0]->abbreviation()); - $this->assertSame('SubNum', $columns[1]->abbreviation()); - $this->assertSame('Name', $columns[2]->abbreviation()); - $this->assertSame('Role', $columns[3]->abbreviation()); - $this->assertSame('Sex', $columns[4]->abbreviation()); - $this->assertSame('DOB', $columns[5]->abbreviation()); - $this->assertSame('MC', $columns[6]->abbreviation()); - $this->assertSame('Occupation', $columns[7]->abbreviation()); + $this->assertSame('Schedule', $columns[0]->abbreviation()); + $this->assertSame('SubNum', $columns[1]->abbreviation()); + $this->assertSame('Name', $columns[2]->abbreviation()); + $this->assertSame('Role', $columns[3]->abbreviation()); + $this->assertSame('Sex', $columns[4]->abbreviation()); + $this->assertSame('DOB', $columns[5]->abbreviation()); + $this->assertSame('MC', $columns[6]->abbreviation()); + $this->assertSame('Occupation', $columns[7]->abbreviation()); - $this->assertSame('Schedule Number', $columns[0]->title()); - $this->assertSame('Schedule Sub Number', $columns[1]->title()); - $this->assertSame('Surname & other names', $columns[2]->title()); - $this->assertSame('For institutions only – for example, Officer, Visitor, Servant, Patient, Inmate', $columns[3]->title()); - $this->assertSame('Male or Female', $columns[4]->title()); - $this->assertSame('Date of birth', $columns[5]->title()); - $this->assertSame('Marital Condition - Married, Single, Unmarried, Widowed or Divorced', $columns[6]->title()); - $this->assertSame('Occupation', $columns[7]->title()); - } + $this->assertSame('Schedule Number', $columns[0]->title()); + $this->assertSame('Schedule Sub Number', $columns[1]->title()); + $this->assertSame('Surname & other names', $columns[2]->title()); + $this->assertSame('For institutions only – for example, Officer, Visitor, Servant, Patient, Inmate', $columns[3]->title()); + $this->assertSame('Male or Female', $columns[4]->title()); + $this->assertSame('Date of birth', $columns[5]->title()); + $this->assertSame('Marital Condition - Married, Single, Unmarried, Widowed or Divorced', $columns[6]->title()); + $this->assertSame('Occupation', $columns[7]->title()); + } } |
