From 96eac16fc8aab503603e8022a5b3984b7db81491 Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sun, 21 Dec 2025 22:50:38 +0000 Subject: PHPunit: mock objects have expectations, stubs do not --- tests/app/Census/CensusColumnSexMKTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/app/Census/CensusColumnSexMKTest.php') diff --git a/tests/app/Census/CensusColumnSexMKTest.php b/tests/app/Census/CensusColumnSexMKTest.php index 5a1d2f3125..2c478990c8 100644 --- a/tests/app/Census/CensusColumnSexMKTest.php +++ b/tests/app/Census/CensusColumnSexMKTest.php @@ -29,10 +29,10 @@ class CensusColumnSexMKTest extends TestCase { public function testMale(): void { - $individual = $this->createMock(Individual::class); + $individual = $this->createStub(Individual::class); $individual->method('sex')->willReturn('M'); - $census = $this->createMock(CensusInterface::class); + $census = $this->createStub(CensusInterface::class); $column = new CensusColumnSexMK($census, '', ''); @@ -41,10 +41,10 @@ class CensusColumnSexMKTest extends TestCase public function testFeale(): void { - $individual = $this->createMock(Individual::class); + $individual = $this->createStub(Individual::class); $individual->method('sex')->willReturn('F'); - $census = $this->createMock(CensusInterface::class); + $census = $this->createStub(CensusInterface::class); $column = new CensusColumnSexMK($census, '', ''); @@ -53,10 +53,10 @@ class CensusColumnSexMKTest extends TestCase public function testUnknownSex(): void { - $individual = $this->createMock(Individual::class); + $individual = $this->createStub(Individual::class); $individual->method('sex')->willReturn('U'); - $census = $this->createMock(CensusInterface::class); + $census = $this->createStub(CensusInterface::class); $column = new CensusColumnSexMK($census, '', ''); -- cgit v1.3