xref: /webtrees/tests/app/Census/CensusColumnConditionDanishTest.php (revision 52348eb8c11b06a8488e13475e6561273832716a)
1101af0b4SGreg Roach<?php
2101af0b4SGreg Roach/**
3101af0b4SGreg Roach * webtrees: online genealogy
41062a142SGreg Roach * Copyright (C) 2018 webtrees development team
5101af0b4SGreg Roach * This program is free software: you can redistribute it and/or modify
6101af0b4SGreg Roach * it under the terms of the GNU General Public License as published by
7101af0b4SGreg Roach * the Free Software Foundation, either version 3 of the License, or
8101af0b4SGreg Roach * (at your option) any later version.
9101af0b4SGreg Roach * This program is distributed in the hope that it will be useful,
10101af0b4SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
11101af0b4SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12101af0b4SGreg Roach * GNU General Public License for more details.
13101af0b4SGreg Roach * You should have received a copy of the GNU General Public License
14101af0b4SGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
15101af0b4SGreg Roach */
16101af0b4SGreg Roachnamespace Fisharebest\Webtrees\Census;
17101af0b4SGreg Roach
18101af0b4SGreg Roachuse Fisharebest\Webtrees\Date;
19101af0b4SGreg Roachuse Mockery;
20101af0b4SGreg Roach
21101af0b4SGreg Roach/**
2273d4df56SGreg Roach * Test harness for the class CensusColumnConditionDanish
23101af0b4SGreg Roach */
2484e2cf4eSGreg Roachclass CensusColumnConditionDanishTest extends \Fisharebest\Webtrees\TestCase
25c1010edaSGreg Roach{
26101af0b4SGreg Roach    /**
27101af0b4SGreg Roach     * Delete mock objects
28*52348eb8SGreg Roach     *
29*52348eb8SGreg Roach     * @return void
30101af0b4SGreg Roach     */
31c1010edaSGreg Roach    public function tearDown()
32c1010edaSGreg Roach    {
33101af0b4SGreg Roach        Mockery::close();
34101af0b4SGreg Roach    }
35101af0b4SGreg Roach
36101af0b4SGreg Roach    /**
3715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
3815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
39*52348eb8SGreg Roach     *
40*52348eb8SGreg Roach     * @return void
41101af0b4SGreg Roach     */
42c1010edaSGreg Roach    public function testNoSpouseFamiliesMale()
43c1010edaSGreg Roach    {
44c314ecc9SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
4500225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('M');
4613abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([]);
4700225b98SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800'));
48101af0b4SGreg Roach
49c314ecc9SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
5000225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
51101af0b4SGreg Roach
5273d4df56SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
53101af0b4SGreg Roach
54342dcecdSGreg Roach        $this->assertSame('Ugift', $column->generate($individual, $individual));
5573d4df56SGreg Roach    }
5673d4df56SGreg Roach
5773d4df56SGreg Roach    /**
5815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
5915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
60*52348eb8SGreg Roach     *
61*52348eb8SGreg Roach     * @return void
6273d4df56SGreg Roach     */
63c1010edaSGreg Roach    public function testNoSpouseFamiliesFemale()
64c1010edaSGreg Roach    {
6500225b98SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
6600225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('F');
6713abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([]);
6800225b98SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800'));
6900225b98SGreg Roach
7000225b98SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
7100225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
7200225b98SGreg Roach
7300225b98SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
7400225b98SGreg Roach
75342dcecdSGreg Roach        $this->assertSame('Ugift', $column->generate($individual, $individual));
7600225b98SGreg Roach    }
7700225b98SGreg Roach
7800225b98SGreg Roach    /**
7915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
8015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
81*52348eb8SGreg Roach     *
82*52348eb8SGreg Roach     * @return void
8300225b98SGreg Roach     */
84c1010edaSGreg Roach    public function testNoFamilyFactsMale()
85c1010edaSGreg Roach    {
86c314ecc9SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
8773d4df56SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
882a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
8973d4df56SGreg Roach
90c314ecc9SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
9113abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
922a6fda60SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800'));
932a6fda60SGreg Roach        $individual->shouldReceive('getSex')->andReturn('M');
9473d4df56SGreg Roach
95c314ecc9SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
9673d4df56SGreg Roach
9773d4df56SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
9873d4df56SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
9973d4df56SGreg Roach
100342dcecdSGreg Roach        $this->assertSame('Ugift', $column->generate($individual, $individual));
10173d4df56SGreg Roach    }
10273d4df56SGreg Roach
10373d4df56SGreg Roach    /**
10415d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
10515d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
106*52348eb8SGreg Roach     *
107*52348eb8SGreg Roach     * @return void
10873d4df56SGreg Roach     */
109c1010edaSGreg Roach    public function testNoFamilyFactsFemale()
110c1010edaSGreg Roach    {
111c314ecc9SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
11273d4df56SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
1132a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
114e76c0cf0SGreg Roach
115e76c0cf0SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
11613abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
1172a6fda60SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800'));
1182a6fda60SGreg Roach        $individual->shouldReceive('getSex')->andReturn('F');
119e76c0cf0SGreg Roach
120e76c0cf0SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
121e76c0cf0SGreg Roach
122e76c0cf0SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
123e76c0cf0SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
124e76c0cf0SGreg Roach
125342dcecdSGreg Roach        $this->assertSame('Ugift', $column->generate($individual, $individual));
126e76c0cf0SGreg Roach    }
127e76c0cf0SGreg Roach
128e76c0cf0SGreg Roach    /**
12915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
13015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
131*52348eb8SGreg Roach     *
132*52348eb8SGreg Roach     * @return void
133e76c0cf0SGreg Roach     */
134c1010edaSGreg Roach    public function testSpouseDeadMale()
135c1010edaSGreg Roach    {
1362a6fda60SGreg Roach        $fact = Mockery::mock('Fisharebest\Webtrees\Fact');
1372a6fda60SGreg Roach
138e76c0cf0SGreg Roach        $spouse = Mockery::mock('Fisharebest\Webtrees\Individual');
139e76c0cf0SGreg Roach        $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820'));
140e76c0cf0SGreg Roach
141e76c0cf0SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
142e76c0cf0SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
1432a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
1442a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('DIV')->andReturn([]);
145e76c0cf0SGreg Roach        $family->shouldReceive('getSpouse')->andReturn($spouse);
146e76c0cf0SGreg Roach
147e76c0cf0SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
148e76c0cf0SGreg Roach        $individual->shouldReceive('getSex')->andReturn('M');
14913abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
150e76c0cf0SGreg Roach
151e76c0cf0SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
152e76c0cf0SGreg Roach
153e76c0cf0SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
154e76c0cf0SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
155e76c0cf0SGreg Roach
156342dcecdSGreg Roach        $this->assertSame('Gift', $column->generate($individual, $individual));
157e76c0cf0SGreg Roach    }
158e76c0cf0SGreg Roach
159e76c0cf0SGreg Roach    /**
16015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
16115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
162*52348eb8SGreg Roach     *
163*52348eb8SGreg Roach     * @return void
164e76c0cf0SGreg Roach     */
165c1010edaSGreg Roach    public function testSpouseDeadFemale()
166c1010edaSGreg Roach    {
1672a6fda60SGreg Roach        $fact = Mockery::mock('Fisharebest\Webtrees\Fact');
1682a6fda60SGreg Roach
169e76c0cf0SGreg Roach        $spouse = Mockery::mock('Fisharebest\Webtrees\Individual');
170e76c0cf0SGreg Roach        $spouse->shouldReceive('getDeathDate')->andReturn(new Date('1820'));
171e76c0cf0SGreg Roach
172e76c0cf0SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
173e76c0cf0SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
1742a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
1752a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('DIV')->andReturn([]);
176e76c0cf0SGreg Roach        $family->shouldReceive('getSpouse')->andReturn($spouse);
17773d4df56SGreg Roach
178c314ecc9SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
17900225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('F');
18013abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
18173d4df56SGreg Roach
182c314ecc9SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
18373d4df56SGreg Roach
18473d4df56SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
18573d4df56SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
18673d4df56SGreg Roach
187342dcecdSGreg Roach        $this->assertSame('Gift', $column->generate($individual, $individual));
18800225b98SGreg Roach    }
18900225b98SGreg Roach
19000225b98SGreg Roach    /**
19115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
19215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
193*52348eb8SGreg Roach     *
194*52348eb8SGreg Roach     * @return void
19500225b98SGreg Roach     */
196c1010edaSGreg Roach    public function testNoFamilyUnmarriedMale()
197c1010edaSGreg Roach    {
19800225b98SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
19900225b98SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
2002a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
20100225b98SGreg Roach
20200225b98SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
20300225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('M');
20413abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
20500225b98SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800'));
20600225b98SGreg Roach
20700225b98SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
20800225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
20900225b98SGreg Roach
21000225b98SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
21100225b98SGreg Roach
212342dcecdSGreg Roach        $this->assertSame('Ugift', $column->generate($individual, $individual));
21373d4df56SGreg Roach    }
21473d4df56SGreg Roach
21573d4df56SGreg Roach    /**
21615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
21715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
218*52348eb8SGreg Roach     *
219*52348eb8SGreg Roach     * @return void
22073d4df56SGreg Roach     */
221c1010edaSGreg Roach    public function testNoFamilyUnmarriedFemale()
222c1010edaSGreg Roach    {
22300225b98SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
22400225b98SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
2252a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
22600225b98SGreg Roach
22700225b98SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
22800225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('F');
22913abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
23000225b98SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1800'));
23100225b98SGreg Roach
23200225b98SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
23300225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
23400225b98SGreg Roach
23500225b98SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
23600225b98SGreg Roach
237342dcecdSGreg Roach        $this->assertSame('Ugift', $column->generate($individual, $individual));
23800225b98SGreg Roach    }
23900225b98SGreg Roach
24000225b98SGreg Roach    /**
24115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
24215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
243*52348eb8SGreg Roach     *
244*52348eb8SGreg Roach     * @return void
24500225b98SGreg Roach     */
246c1010edaSGreg Roach    public function testChildMale()
247c1010edaSGreg Roach    {
24800225b98SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
24900225b98SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
2502a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
25100225b98SGreg Roach
25200225b98SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
25300225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('M');
25413abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
25500225b98SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820'));
25600225b98SGreg Roach
25700225b98SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
25800225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
25900225b98SGreg Roach
26000225b98SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
26100225b98SGreg Roach
262342dcecdSGreg Roach        $this->assertSame('', $column->generate($individual, $individual));
26300225b98SGreg Roach    }
26400225b98SGreg Roach
26500225b98SGreg Roach    /**
26615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
26715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
268*52348eb8SGreg Roach     *
269*52348eb8SGreg Roach     * @return void
27000225b98SGreg Roach     */
271c1010edaSGreg Roach    public function testChildFemale()
272c1010edaSGreg Roach    {
27300225b98SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
27400225b98SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
2752a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
27600225b98SGreg Roach
27700225b98SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
27800225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('F');
27913abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
28000225b98SGreg Roach        $individual->shouldReceive('getEstimatedBirthDate')->andReturn(new Date('1820'));
28100225b98SGreg Roach
28200225b98SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
28300225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
28400225b98SGreg Roach
28500225b98SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
28600225b98SGreg Roach
287342dcecdSGreg Roach        $this->assertSame('', $column->generate($individual, $individual));
28800225b98SGreg Roach    }
28900225b98SGreg Roach
29000225b98SGreg Roach    /**
29115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
29215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
293*52348eb8SGreg Roach     *
294*52348eb8SGreg Roach     * @return void
29500225b98SGreg Roach     */
296c1010edaSGreg Roach    public function testDivorcedMale()
297c1010edaSGreg Roach    {
298c314ecc9SGreg Roach        $fact = Mockery::mock('Fisharebest\Webtrees\Fact');
29973d4df56SGreg Roach
300c314ecc9SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
30173d4df56SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
3020b4be234SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
30313abd6f3SGreg Roach        $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]);
30473d4df56SGreg Roach
305c314ecc9SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
30600225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('M');
30713abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
30800225b98SGreg Roach
30900225b98SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
31000225b98SGreg Roach
31100225b98SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
31200225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
31300225b98SGreg Roach
314342dcecdSGreg Roach        $this->assertSame('Skilt', $column->generate($individual, $individual));
31500225b98SGreg Roach    }
31600225b98SGreg Roach
31700225b98SGreg Roach    /**
31815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionDanish
31915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
320*52348eb8SGreg Roach     *
321*52348eb8SGreg Roach     * @return void
32200225b98SGreg Roach     */
323c1010edaSGreg Roach    public function testDivorcedFemale()
324c1010edaSGreg Roach    {
32500225b98SGreg Roach        $fact = Mockery::mock('Fisharebest\Webtrees\Fact');
32600225b98SGreg Roach
32700225b98SGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
32800225b98SGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
3290b4be234SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([$fact]);
33013abd6f3SGreg Roach        $family->shouldReceive('getFacts')->with('DIV')->andReturn([$fact]);
33100225b98SGreg Roach
33200225b98SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
33300225b98SGreg Roach        $individual->shouldReceive('getSex')->andReturn('F');
33413abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
33573d4df56SGreg Roach
336c314ecc9SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
33773d4df56SGreg Roach
33873d4df56SGreg Roach        $column = new CensusColumnConditionDanish($census, '', '');
33973d4df56SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
34073d4df56SGreg Roach
341342dcecdSGreg Roach        $this->assertSame('Skilt', $column->generate($individual, $individual));
342101af0b4SGreg Roach    }
343101af0b4SGreg Roach}
344