From 36951dcb4bda760e5dcde102bb68c826ffad0c42 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Thu, 19 Dec 2024 11:19:04 +0000 Subject: [PATCH 1/3] fix test broken by merge of main into branch --- .../Service/Lpa/FindActorInLpaTest.php | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/service-api/app/test/AppTest/Service/Lpa/FindActorInLpaTest.php b/service-api/app/test/AppTest/Service/Lpa/FindActorInLpaTest.php index c63f6977b0..7c7954cb91 100644 --- a/service-api/app/test/AppTest/Service/Lpa/FindActorInLpaTest.php +++ b/service-api/app/test/AppTest/Service/Lpa/FindActorInLpaTest.php @@ -412,24 +412,6 @@ private static function activeAttorneyFixture(): SiriusLpaAttorney ); } - public static function nullDOBAttorneyFixtureOld(): SiriusPerson - { - return new SiriusPerson( - [ - 'uId' => '7000000055555', - 'dob' => null, - 'firstname' => 'Testering', - 'surname' => 'T’esting', - 'addresses' => [ - [ - 'postcode' => 'Ab1 2Cd', - ], - ], - 'systemStatus' => true, - ] - ); - } - public static function nullDOBAttorneyFixture(): SiriusLpaAttorney { return new SiriusLpaAttorney( @@ -511,27 +493,4 @@ public static function nullDOBAttorneyFixtureOld(): SiriusPerson new Logger('test-output'), ); } - - public static function nullDOBAttorneyFixture(): SiriusLpaAttorney - { - return new SiriusLpaAttorney( - addressLine1: null, - addressLine2: null, - addressLine3: null, - country: null, - county: null, - dob: null, - email: null, - firstname: 'Testering', - id: '7', - middlenames: null, - otherNames: null, - postcode: 'PY1 3Kd', - surname: 'Person', - systemStatus: null, - town: null, - type: null, - uId: '700000001111' - ); - } } From 57c17e0254c6aee2043db2b1884ca9e58d69bd51 Mon Sep 17 00:00:00 2001 From: Nick Davis Date: Thu, 19 Dec 2024 11:20:08 +0000 Subject: [PATCH 2/3] fix test broken by merge in of main --- .../AppTest/Service/Lpa/GetTrustCorporationStatusTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php b/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php index 3c68b56fff..330f2af824 100644 --- a/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php +++ b/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php @@ -10,6 +10,7 @@ use App\Service\Lpa\GetTrustCorporationStatus; use App\Service\Lpa\GetTrustCorporationStatus\TrustCorporationStatus; use App\Service\Lpa\SiriusPerson; +use Monolog\Logger; use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; @@ -36,7 +37,8 @@ public function returns_active_if_trustCorporation_is_active(): void 'uId' => 7, 'companyName' => 'ABC Ltd', 'systemStatus' => true, - ] + ], + new Logger('test-output'), ); $status = new GetTrustCorporationStatus( From 06ce6f9fedd9958ec20225a7d0c0ab85e8df3654 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Thu, 19 Dec 2024 13:53:30 +0000 Subject: [PATCH 3/3] Use mock logger in place of Monolog instance --- .../AppTest/Service/Lpa/GetTrustCorporationStatusTest.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php b/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php index 330f2af824..0279227eb3 100644 --- a/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php +++ b/service-api/app/test/AppTest/Service/Lpa/GetTrustCorporationStatusTest.php @@ -10,7 +10,6 @@ use App\Service\Lpa\GetTrustCorporationStatus; use App\Service\Lpa\GetTrustCorporationStatus\TrustCorporationStatus; use App\Service\Lpa\SiriusPerson; -use Monolog\Logger; use PHPUnit\Framework\Attributes\Test; use PHPUnit\Framework\TestCase; use Prophecy\PhpUnit\ProphecyTrait; @@ -31,14 +30,13 @@ public function setUp(): void #[Test] public function returns_active_if_trustCorporation_is_active(): void { - $trustCorporation = new SiriusPerson( [ 'uId' => 7, 'companyName' => 'ABC Ltd', 'systemStatus' => true, ], - new Logger('test-output'), + $this->prophesize(LoggerInterface::class)->reveal(), ); $status = new GetTrustCorporationStatus(