xref: /webtrees/tests/app/Census/CensusColumnConditionUsTest.php (revision 52348eb8c11b06a8488e13475e6561273832716a)
181d1be7aSGreg Roach<?php
281d1be7aSGreg Roach/**
381d1be7aSGreg Roach * webtrees: online genealogy
41062a142SGreg Roach * Copyright (C) 2018 webtrees development team
581d1be7aSGreg Roach * This program is free software: you can redistribute it and/or modify
681d1be7aSGreg Roach * it under the terms of the GNU General Public License as published by
781d1be7aSGreg Roach * the Free Software Foundation, either version 3 of the License, or
881d1be7aSGreg Roach * (at your option) any later version.
981d1be7aSGreg Roach * This program is distributed in the hope that it will be useful,
1081d1be7aSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1181d1be7aSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1281d1be7aSGreg Roach * GNU General Public License for more details.
1381d1be7aSGreg Roach * You should have received a copy of the GNU General Public License
1481d1be7aSGreg Roach * along with this program. If not, see <http://www.gnu.org/licenses/>.
1581d1be7aSGreg Roach */
1681d1be7aSGreg Roachnamespace Fisharebest\Webtrees\Census;
1781d1be7aSGreg Roach
1881d1be7aSGreg Roachuse Fisharebest\Webtrees\Date;
1981d1be7aSGreg Roachuse Mockery;
2081d1be7aSGreg Roach
2181d1be7aSGreg Roach/**
2281d1be7aSGreg Roach * Test harness for the class CensusColumnConditionUs
2381d1be7aSGreg Roach */
2484e2cf4eSGreg Roachclass CensusColumnConditionUsTest extends \Fisharebest\Webtrees\TestCase
25c1010edaSGreg Roach{
2681d1be7aSGreg Roach    /**
2781d1be7aSGreg Roach     * Delete mock objects
28*52348eb8SGreg Roach     *
29*52348eb8SGreg Roach     * @return void
3081d1be7aSGreg Roach     */
31c1010edaSGreg Roach    public function tearDown()
32c1010edaSGreg Roach    {
3381d1be7aSGreg Roach        Mockery::close();
3481d1be7aSGreg Roach    }
3581d1be7aSGreg Roach
3681d1be7aSGreg Roach    /**
3715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
3815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
39*52348eb8SGreg Roach     *
40*52348eb8SGreg Roach     * @return void
4181d1be7aSGreg Roach     */
42c1010edaSGreg Roach    public function testNoSpouseFamiliesMale()
43c1010edaSGreg Roach    {
4481d1be7aSGreg 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'));
4881d1be7aSGreg Roach
4981d1be7aSGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
5000225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
5181d1be7aSGreg Roach
5281d1be7aSGreg Roach        $column = new CensusColumnConditionUs($census, '', '');
5381d1be7aSGreg Roach
54342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
5581d1be7aSGreg Roach    }
5681d1be7aSGreg Roach
5781d1be7aSGreg Roach    /**
5815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
5915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
60*52348eb8SGreg Roach     *
61*52348eb8SGreg Roach     * @return void
6281d1be7aSGreg 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 CensusColumnConditionUs($census, '', '');
7400225b98SGreg Roach
75342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
7600225b98SGreg Roach    }
7700225b98SGreg Roach
7800225b98SGreg Roach    /**
7915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
8015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
81*52348eb8SGreg Roach     *
82*52348eb8SGreg Roach     * @return void
8300225b98SGreg Roach     */
84c1010edaSGreg Roach    public function testNoFamilyFactsMale()
85c1010edaSGreg Roach    {
8681d1be7aSGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
8781d1be7aSGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
882a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
8981d1be7aSGreg Roach
9081d1be7aSGreg 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');
9481d1be7aSGreg Roach
9581d1be7aSGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
9681d1be7aSGreg Roach
9781d1be7aSGreg Roach        $column = new CensusColumnConditionUs($census, '', '');
9881d1be7aSGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
9981d1be7aSGreg Roach
100342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
10181d1be7aSGreg Roach    }
10281d1be7aSGreg Roach
10381d1be7aSGreg Roach    /**
10415d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
10515d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
106*52348eb8SGreg Roach     *
107*52348eb8SGreg Roach     * @return void
10881d1be7aSGreg Roach     */
109c1010edaSGreg Roach    public function testNoFamilyFactsFemale()
110c1010edaSGreg Roach    {
11181d1be7aSGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
11281d1be7aSGreg Roach        $family->shouldReceive('getMarriageDate')->andReturn(new Date(''));
1132a6fda60SGreg Roach        $family->shouldReceive('getFacts')->with('MARR')->andReturn([]);
11481d1be7aSGreg Roach
11581d1be7aSGreg 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');
11981d1be7aSGreg Roach
12081d1be7aSGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
12181d1be7aSGreg Roach
12281d1be7aSGreg Roach        $column = new CensusColumnConditionUs($census, '', '');
12381d1be7aSGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
12481d1be7aSGreg Roach
125342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
12600225b98SGreg Roach    }
12700225b98SGreg Roach
12800225b98SGreg Roach    /**
12915d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
13015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
131*52348eb8SGreg Roach     *
132*52348eb8SGreg Roach     * @return void
13300225b98SGreg 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 CensusColumnConditionUs($census, '', '');
154e76c0cf0SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
155e76c0cf0SGreg Roach
156342dcecdSGreg Roach        $this->assertSame('W', $column->generate($individual, $individual));
157e76c0cf0SGreg Roach    }
158e76c0cf0SGreg Roach
159e76c0cf0SGreg Roach    /**
16015d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
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);
177e76c0cf0SGreg Roach
178e76c0cf0SGreg Roach        $individual = Mockery::mock('Fisharebest\Webtrees\Individual');
179e76c0cf0SGreg Roach        $individual->shouldReceive('getSex')->andReturn('F');
18013abd6f3SGreg Roach        $individual->shouldReceive('getSpouseFamilies')->andReturn([$family]);
181e76c0cf0SGreg Roach
182e76c0cf0SGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
183e76c0cf0SGreg Roach
184e76c0cf0SGreg Roach        $column = new CensusColumnConditionUs($census, '', '');
185e76c0cf0SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
186e76c0cf0SGreg Roach
187342dcecdSGreg Roach        $this->assertSame('W', $column->generate($individual, $individual));
188e76c0cf0SGreg Roach    }
189e76c0cf0SGreg Roach
190e76c0cf0SGreg Roach    /**
19115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
19215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
193*52348eb8SGreg Roach     *
194*52348eb8SGreg Roach     * @return void
195e76c0cf0SGreg 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 CensusColumnConditionUs($census, '', '');
21100225b98SGreg Roach
212342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
21381d1be7aSGreg Roach    }
21481d1be7aSGreg Roach
21581d1be7aSGreg Roach    /**
21615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
21715d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
218*52348eb8SGreg Roach     *
219*52348eb8SGreg Roach     * @return void
22081d1be7aSGreg 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 CensusColumnConditionUs($census, '', '');
23600225b98SGreg Roach
237342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
23800225b98SGreg Roach    }
23900225b98SGreg Roach
24000225b98SGreg Roach    /**
24115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
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 CensusColumnConditionUs($census, '', '');
26100225b98SGreg Roach
262342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
26300225b98SGreg Roach    }
26400225b98SGreg Roach
26500225b98SGreg Roach    /**
26615d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
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 CensusColumnConditionUs($census, '', '');
28600225b98SGreg Roach
287342dcecdSGreg Roach        $this->assertSame('S', $column->generate($individual, $individual));
28800225b98SGreg Roach    }
28900225b98SGreg Roach
29000225b98SGreg Roach    /**
29115d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
29215d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\AbstractCensusColumnCondition
293*52348eb8SGreg Roach     *
294*52348eb8SGreg Roach     * @return void
29500225b98SGreg Roach     */
296c1010edaSGreg Roach    public function testDivorcedMale()
297c1010edaSGreg Roach    {
29881d1be7aSGreg Roach        $fact = Mockery::mock('Fisharebest\Webtrees\Fact');
29981d1be7aSGreg Roach
30081d1be7aSGreg Roach        $family = Mockery::mock('Fisharebest\Webtrees\Family');
30181d1be7aSGreg 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]);
30481d1be7aSGreg Roach
30581d1be7aSGreg 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 CensusColumnConditionUs($census, '', '');
31200225b98SGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
31300225b98SGreg Roach
314342dcecdSGreg Roach        $this->assertSame('D', $column->generate($individual, $individual));
31500225b98SGreg Roach    }
31600225b98SGreg Roach
31700225b98SGreg Roach    /**
31815d603e7SGreg Roach     * @covers \Fisharebest\Webtrees\Census\CensusColumnConditionUs
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]);
33581d1be7aSGreg Roach
33681d1be7aSGreg Roach        $census = Mockery::mock('Fisharebest\Webtrees\Census\CensusInterface');
33781d1be7aSGreg Roach
33881d1be7aSGreg Roach        $column = new CensusColumnConditionUs($census, '', '');
33981d1be7aSGreg Roach        $census->shouldReceive('censusDate')->andReturn('30 JUN 1830');
34081d1be7aSGreg Roach
341342dcecdSGreg Roach        $this->assertSame('D', $column->generate($individual, $individual));
34281d1be7aSGreg Roach    }
34381d1be7aSGreg Roach}
344