8 use Braintree\Result\Successful;
9 use Braintree\Transaction;
20 private $subjectReader;
38 $this->subjectReader->readCustomerId([]);
59 $this->subjectReader->readPublicHash([]);
68 $hash =
'fj23djf2o1fd';
69 $this->assertEquals($hash, $this->subjectReader->readPublicHash([
'public_hash' => $hash]));
81 'id' =>
'u38rf8kg6vn',
93 'paymentId' =>
'3ek7dk7fn0vi1',
101 $this->assertEquals($paypal, $this->subjectReader->readPayPal(
$transaction));
113 'object' =>
new Successful(
$transaction,
'transaction'),
115 $actual = $this->subjectReader->readTransaction(
$response);
131 $this->expectExceptionMessage($expectedMessage);
132 $this->subjectReader->readTransaction(
$response);
151 'expectedMessage' =>
'Response object does not exist.',
155 'object' => new \stdClass(),
157 'expectedMessage' =>
'The object is not a class \Braintree\Transaction.',
163 'expectedMessage' =>
'The object is not a class \Braintree\Transaction.',
invalidTransactionResponseDataProvider()
testReadTransactionWithInvalidResponse(array $response, string $expectedMessage)
testReadPublicHashWithException()
testReadCustomerIdWithException()
testReadPayPalWithException()