diff --git a/tests/PHPUnit/ApiClient/Entity/AuthorizationTest.php b/tests/PHPUnit/ApiClient/Entity/AuthorizationTest.php index 8843ce002..c5895a2f4 100644 --- a/tests/PHPUnit/ApiClient/Entity/AuthorizationTest.php +++ b/tests/PHPUnit/ApiClient/Entity/AuthorizationTest.php @@ -11,7 +11,7 @@ class AuthorizationTest extends TestCase public function testIdAndStatus() { $authorizationStatus = \Mockery::mock(AuthorizationStatus::class); - $testee = new Authorization('foo', $authorizationStatus); + $testee = new Authorization('foo', $authorizationStatus, null); $this->assertEquals('foo', $testee->id()); $this->assertEquals($authorizationStatus, $testee->status()); @@ -22,7 +22,7 @@ class AuthorizationTest extends TestCase $authorizationStatus = \Mockery::mock(AuthorizationStatus::class); $authorizationStatus->expects('name')->andReturn('CAPTURED'); - $testee = new Authorization('foo', $authorizationStatus); + $testee = new Authorization('foo', $authorizationStatus, null); $expected = [ 'id' => 'foo', diff --git a/tests/PHPUnit/ApiClient/Factory/AuthorizationFactoryTest.php b/tests/PHPUnit/ApiClient/Factory/AuthorizationFactoryTest.php index 12a76a016..71df98376 100644 --- a/tests/PHPUnit/ApiClient/Factory/AuthorizationFactoryTest.php +++ b/tests/PHPUnit/ApiClient/Factory/AuthorizationFactoryTest.php @@ -17,8 +17,9 @@ class AuthorizationFactoryTest extends TestCase 'id' => 'foo', 'status' => 'CAPTURED', ]; + $fraudProcessorResponseFactory = \Mockery::mock(FraudProcessorResponseFactory::class); - $testee = new AuthorizationFactory(); + $testee = new AuthorizationFactory($fraudProcessorResponseFactory); $result = $testee->from_paypal_response($response); $this->assertInstanceOf(Authorization::class, $result); @@ -36,7 +37,9 @@ class AuthorizationFactoryTest extends TestCase 'status' => 'CAPTURED', ]; - $testee = new AuthorizationFactory(); + $fraudProcessorResponseFactory = \Mockery::mock(FraudProcessorResponseFactory::class); + + $testee = new AuthorizationFactory($fraudProcessorResponseFactory); $testee->from_paypal_response($response); } @@ -47,7 +50,9 @@ class AuthorizationFactoryTest extends TestCase 'id' => 'foo', ]; - $testee = new AuthorizationFactory(); + $fraudProcessorResponseFactory = \Mockery::mock(FraudProcessorResponseFactory::class); + + $testee = new AuthorizationFactory($fraudProcessorResponseFactory); $testee->from_paypal_response($response); } } diff --git a/tests/PHPUnit/WcGateway/Processor/AuthorizedPaymentsProcessorTest.php b/tests/PHPUnit/WcGateway/Processor/AuthorizedPaymentsProcessorTest.php index f65338f67..5dd7c588f 100644 --- a/tests/PHPUnit/WcGateway/Processor/AuthorizedPaymentsProcessorTest.php +++ b/tests/PHPUnit/WcGateway/Processor/AuthorizedPaymentsProcessorTest.php @@ -251,7 +251,7 @@ class AuthorizedPaymentsProcessorTest extends TestCase } private function createAuthorization(string $id, string $status): Authorization { - return new Authorization($id, new AuthorizationStatus($status)); + return new Authorization($id, new AuthorizationStatus($status), null); } private function createCapture(string $id, string $status): Capture {