Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
08792e3
MAGETWO-91848: Hint on product option with Maximum Characters should …
danielrenaud May 18, 2018
e7327e9
MAGETWO-91848: Hint on product option with Maximum Characters should …
danielrenaud May 22, 2018
9000d93
MAGETWO-91848: Hint on product option with Maximum Characters should …
danielrenaud May 23, 2018
53a215a
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma May 24, 2018
a53c9d0
Merge branch '2.3-develop' into MAGETWO-90808
zakdma May 24, 2018
3f20783
MAGETWO-91848: Hint on product option with Maximum Characters should …
danielrenaud May 24, 2018
0c5c912
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma May 24, 2018
af1709a
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma May 25, 2018
08f7334
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma May 29, 2018
321255a
Merge branch '2.3-develop' into MAGETWO-90808
zakdma May 29, 2018
c2c0abf
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-90808
zakdma May 29, 2018
deb14f9
test for validation hint on textfield custom product option
RyanZolper May 29, 2018
f89061d
fixed dev group value
RyanZolper May 29, 2018
87a2f1b
MAGETWO-91848: Hint on product option with Maximum Characters should …
danielrenaud May 30, 2018
2cba103
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-9184…
danielrenaud May 30, 2018
b639333
Merge remote-tracking branch 'origin/MAGETWO-91848-max-characters' in…
danielrenaud May 30, 2018
2eb0598
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-9184…
danielrenaud May 30, 2018
647ad8a
MAGETWO-50831: Impossible specify Bundle option title on store view l…
OlgaVasyltsun Jun 1, 2018
513f1e0
MAGETWO-91803: Double click (not too fast) on proceed to check out af…
StasKozar Jun 1, 2018
38180f2
removed category_ids and tax_class_id from filterable fields list
Jun 2, 2018
058bc54
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-50831
OlgaVasyltsun Jun 4, 2018
e7c3e29
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma Jun 4, 2018
78d8ba1
Merge branch '2.3-develop' into MAGETWO-90808
zakdma Jun 4, 2018
55d4cf8
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma Jun 4, 2018
c943561
MAGETWO-50831: Impossible specify Bundle option title on store view l…
OlgaVasyltsun Jun 4, 2018
38cabd3
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma Jun 4, 2018
788c1aa
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-9184…
danielrenaud Jun 4, 2018
619db2d
ENGCOM-1833: removed category_ids and tax_class_id from filterable fi…
magento-engcom-team Jun 4, 2018
c5ca935
ENGCOM-1833: Limit list of filterable product fields #26
Jun 4, 2018
7a3d351
MAGETWO-90764: [2.3.0] Cannot cancel orders with an expired authoriza…
OlgaVasyltsun Jun 5, 2018
b45ef30
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma Jun 5, 2018
cad4518
Merge branch '2.3-develop' into MAGETWO-90808
zakdma Jun 5, 2018
75b821d
MAGETWO-90808: [Performance] Customer Import check data does not comp…
zakdma Jun 5, 2018
32e7169
MAGETWO-92128: Limitation of displayed attribute options number in la…
OlgaVasyltsun Jun 5, 2018
bc3c5db
Merge branch '2.3-develop' into MAGETWO-92128
OlgaVasyltsun Jun 5, 2018
d008516
Merge remote-tracking branch 'origin/MAGETWO-50831' into 2.3-develop-…
OlgaVasyltsun Jun 5, 2018
e46e5a5
check if order data is available to incl ec
torhoehn Jun 4, 2018
c77d3cb
ENGCOM-1872: [Up-port] check if order data is available to incl ec #1…
magento-engcom-team Jun 5, 2018
c3f5cd7
MAGETWO-67024: Sorting by price ignores Catalog Price Rule for Simple…
svitja Jun 5, 2018
c5295a4
MAGETWO-67024: Sorting by price ignores Catalog Price Rule for Simple…
svitja Jun 5, 2018
8583f10
MAGETWO-90764: [2.3.0] Cannot cancel orders with an expired authoriza…
OlgaVasyltsun Jun 5, 2018
16dd29a
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-9184…
danielrenaud Jun 5, 2018
43533f9
Update webapi.xml to fix typo
mhaack Jun 5, 2018
2c9cc60
MAGETWO-91437: Invalidate indexer after category is deleted
eric-bohanon Jun 5, 2018
eeef0be
MAGETWO-91437: Fix tests
eric-bohanon Jun 5, 2018
d93fc4f
merge magento/2.3-develop into magento-borg/MAGETWO-91848-max-characters
Jun 6, 2018
eae1379
MAGETWO-92136: Tiered pricing and quantity Increments do not work wit…
svitja Jun 6, 2018
d35b544
ENGCOM-1890: [Forwardport] Update webapi.xml to fix typo #15867
magento-engcom-team Jun 6, 2018
697db6f
Merge remote-tracking branch 'origin/MAGETWO-90764' into 2.3-develop-…
DianaRusin Jun 6, 2018
5da50d2
MAGETWO-67024: Sorting by price ignores Catalog Price Rule for Simple…
svitja Jun 6, 2018
f70c155
MAGETWO-67024: Sorting by price ignores Catalog Price Rule for Simple…
svitja Jun 6, 2018
23d76ed
Adjust the cache key for product price box renderer in order to fix t…
dmytro-ch Jun 6, 2018
9620f5a
Merge remote-tracking branch 'origin/MAGETWO-92128' into 2.3-develop-…
DianaRusin Jun 6, 2018
a556767
merge magento/2.3-develop into magento-honey-badgers/MAGETWO-91437-Ca…
Jun 6, 2018
ffa75c9
MAGETWO-91437: Fix unit and static failures
eric-bohanon Jun 6, 2018
d8f617f
MAGETWO-91848: Hint on product option with Maximum Characters should …
danielrenaud Jun 6, 2018
fdaf7cb
Remove double semicolon from the style sheets.
sanganinamrata Jun 5, 2018
3782793
Fixed set template syntax issue
sanganinamrata Jun 5, 2018
4d03776
chore: remove unused less import
DanielRuf Jun 5, 2018
4d611ba
ENGCOM-1901: [Forwardport] chore: remove unused less import #15921
magento-engcom-team Jun 7, 2018
56fc476
ENGCOM-1912: [Forwardport] Fixed set template syntax issue #15912
magento-engcom-team Jun 7, 2018
52c4e2b
ENGCOM-1913: [Forwardport] Remove double semicolon from the style she…
magento-engcom-team Jun 7, 2018
5d9e6ea
ENGCOM-1914: [Forwardport] Complete the fix for cache issue due to th…
magento-engcom-team Jun 7, 2018
7618a9a
ENGCOM-1914: [Forwardport] Complete the fix for cache issue due to th…
Jun 7, 2018
fba5580
ENGCOM-1913: [Forwardport] Remove double semicolon from the style she…
Jun 7, 2018
c95e087
ENGCOM-1912: [Forwardport] Fixed set template syntax issue #15912
Jun 7, 2018
a3762f9
ENGCOM-1901: [Forwardport] chore: remove unused less import #15921
Jun 7, 2018
d6d758f
ENGCOM-1890: [Forwardport] Update webapi.xml to fix typo #15867
Jun 7, 2018
1b51d5c
ENGCOM-1872: [Up-port] check if order data is available to incl ec #1…
Jun 7, 2018
a9e9127
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-92136
ameysar Jun 7, 2018
30892bd
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-67024
zakdma Jun 7, 2018
73c97af
Merge remote-tracking branch 'origin/MAGETWO-67024' into 2.3-develop-…
zakdma Jun 7, 2018
c212f14
Merge remote-tracking branch 'origin/MAGETWO-92136' into 2.3-develop-…
ameysar Jun 7, 2018
5630657
Merge remote-tracking branch 'origin/MAGETWO-91803' into 2.3-develop-…
StasKozar Jun 7, 2018
55a6d51
MAGETWO-92133: Admin global search feature broken
svitja Jun 7, 2018
bb039a6
Merge remote-tracking branch 'origin/MAGETWO-90808' into 2.3-develop-…
StasKozar Jun 7, 2018
4688217
:arrows_clockwise: [EngCom] Public Pull Requests - 2.3-develop
magento-engcom-team Jun 7, 2018
3bcd0d0
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-9184…
danielrenaud Jun 7, 2018
d6886c1
Merge remote-tracking branch 'origin/MAGETWO-92133' into 2.3-develop-…
StasKozar Jun 7, 2018
073fd71
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr22
zakdma Jun 7, 2018
f64e7fa
MAGETWO-91437: Formatting change
eric-bohanon Jun 7, 2018
941f26f
ENGCOM-1833: Limit list of filterable product fields #26
Jun 7, 2018
90e95ff
merge magento/2.3-develop into magento-honey-badgers/MAGETWO-91437-Ca…
Jun 7, 2018
7d370f4
MAGETWO-91848: Hint on product option with Maximum Characters should …
danielrenaud Jun 7, 2018
681e65f
Wrong annotation in _toOptionArray : lib\internal\Magento\Framework\D…
sanganinamrata Jun 6, 2018
cb0108f
Wrong annotation in _toOptionArray : lib\internal\Magento\Framework\D…
sanganinamrata Jun 6, 2018
d76fe20
ISSUE-11477 - fixed Swagger response for searchCriteria - added zero …
May 18, 2018
2b7beca
Merge pull request #2660 from magento-honey-badgers/MAGETWO-91437-Cat…
cpartica Jun 8, 2018
f752b9e
No need to pass method parameter as method definition does not requir…
Jun 6, 2018
f5df570
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr22
zakdma Jun 8, 2018
7c08f0d
Merge remote-tracking branch 'mainline/2.3-develop' into MAGETWO-9184…
danielrenaud Jun 8, 2018
e279d2c
Merge pull request #2651 from magento-borg/MAGETWO-91848-max-characters
cpartica Jun 8, 2018
f7c3630
MAGETWO-92468: Make PR tests namespace-agnostic to support testing ex…
pdohogne-magento Jun 5, 2018
5fe735b
MAGETWO-92468: Blacklisting non-Magento code directories from copyrig…
pdohogne-magento Jun 7, 2018
9efebd7
Merge branch 'mainline-2.3-develop' into ENGCOM-1833-magento-graphql-…
Jun 8, 2018
ce8a93e
Merge remote-tracking branch 'remotes/mainline/2.3-develop' into ENGC…
Jun 9, 2018
3ab560d
Merge pull request #2672 from magento-engcom/ENGCOM-1833-magento-grap…
paliarush Jun 9, 2018
ca5df87
merge magento/2.3-develop into magento-borg/MAGETWO-92468-make-tests-…
Jun 9, 2018
33393e2
Merge pull request #2676 from magento-borg/MAGETWO-92468-make-tests-n…
pdohogne-magento Jun 9, 2018
19967c0
ENGCOM-1933: [Forwardport]No need to pass method parameter as method …
magento-engcom-team Jun 11, 2018
0717f9c
ENGCOM-1934: [Forwardport] ISSUE-11477 - fixed Swagger response for s…
magento-engcom-team Jun 11, 2018
9bdd954
ENGCOM-1936: [Forwardport] Wrong annotation in _toOptionArray : lib\i…
magento-engcom-team Jun 11, 2018
e65c7c1
ENGCOM-1936: [Forwardport] Wrong annotation in _toOptionArray : lib\i…
Jun 11, 2018
05f9392
ENGCOM-1934: [Forwardport] ISSUE-11477 - fixed Swagger response for s…
Jun 11, 2018
49ce545
ENGCOM-1933: [Forwardport]No need to pass method parameter as method …
Jun 11, 2018
55256fa
:arrows_clockwise: [EngCom] Public Pull Requests - 2.3-develop
magento-engcom-team Jun 11, 2018
cb141c5
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr22
zakdma Jun 11, 2018
5cfc987
merge magento/2.3-develop into magento-tsg/2.3-develop-pr22
Jun 11, 2018
02aaccb
Merge pull request #2681 from magento-tsg/2.3-develop-pr22
Jun 11, 2018
d9ee180
Attribute set save refactor
AnshuMishra17 Jun 11, 2018
e77424b
code style : 120 line limit
AnshuMishra17 Jun 11, 2018
d4278e4
magento/magento2#15990: Attribute set save admin controller refactor
ihor-sviziev Jun 12, 2018
bad62ef
magento/magento2#15990: Attribute set save admin controller refactor
ihor-sviziev Jun 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/code/Magento/Backend/Block/GlobalSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public function getWidgetInitOptions()
'filterProperty' => 'name',
'preventClickPropagation' => false,
'minLength' => 2,
'submitInputOnEnter' => false,
]
];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Braintree\Gateway\Response;

use Magento\Braintree\Gateway\SubjectReader;
use Magento\Payment\Gateway\Response\HandlerInterface;
use Magento\Sales\Model\Order\Payment;

/**
* Handles response details for order cancellation request.
*/
class CancelDetailsHandler implements HandlerInterface
{
/**
* @var SubjectReader
*/
private $subjectReader;

/**
* @param SubjectReader $subjectReader
*/
public function __construct(SubjectReader $subjectReader)
{
$this->subjectReader = $subjectReader;
}

/**
* @inheritdoc
*/
public function handle(array $handlingSubject, array $response)
{
$paymentDO = $this->subjectReader->readPayment($handlingSubject);
/** @var Payment $orderPayment */
$orderPayment = $paymentDO->getPayment();
$orderPayment->setIsTransactionClosed(true);
$orderPayment->setShouldCloseParentTransaction(true);
}
}
9 changes: 5 additions & 4 deletions app/code/Magento/Braintree/Gateway/SubjectReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,20 @@ public function readPayment(array $subject)
}

/**
* Reads transaction from subject
* Reads transaction from the subject.
*
* @param array $subject
* @return \Braintree\Transaction
* @return Transaction
* @throws \InvalidArgumentException if the subject doesn't contain transaction details.
*/
public function readTransaction(array $subject)
{
if (!isset($subject['object']) || !is_object($subject['object'])) {
throw new \InvalidArgumentException('Response object does not exist');
throw new \InvalidArgumentException('Response object does not exist.');
}

if (!isset($subject['object']->transaction)
&& !$subject['object']->transaction instanceof Transaction
|| !$subject['object']->transaction instanceof Transaction
) {
throw new \InvalidArgumentException('The object is not a class \Braintree\Transaction.');
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Braintree\Gateway\Validator;

use Braintree\Error\ErrorCollection;
use Braintree\Error\Validation;
use Magento\Payment\Gateway\Validator\AbstractValidator;
use Magento\Payment\Gateway\Validator\ResultInterface;
use Magento\Payment\Gateway\Validator\ResultInterfaceFactory;
use Magento\Braintree\Gateway\SubjectReader;

/**
* Decorates the general response validator to handle specific cases.
*
* This validator decorates the general response validator to handle specific cases like
* an expired or already voided on Braintree side authorization transaction.
*/
class CancelResponseValidator extends AbstractValidator
{
/**
* @var int
*/
private static $acceptableTransactionCode = 91504;

/**
* @var GeneralResponseValidator
*/
private $generalResponseValidator;

/**
* @var SubjectReader
*/
private $subjectReader;

/**
* @param ResultInterfaceFactory $resultFactory
* @param GeneralResponseValidator $generalResponseValidator
* @param SubjectReader $subjectReader
*/
public function __construct(
ResultInterfaceFactory $resultFactory,
GeneralResponseValidator $generalResponseValidator,
SubjectReader $subjectReader
) {
parent::__construct($resultFactory);
$this->generalResponseValidator = $generalResponseValidator;
$this->subjectReader = $subjectReader;
}

/**
* @inheritdoc
*/
public function validate(array $validationSubject): ResultInterface
{
$result = $this->generalResponseValidator->validate($validationSubject);
if (!$result->isValid()) {
$response = $this->subjectReader->readResponseObject($validationSubject);
if ($this->isErrorAcceptable($response->errors)) {
$result = $this->createResult(true, [__('Transaction is cancelled offline.')]);
}
}

return $result;
}

/**
* Checks if error collection has an acceptable error code.
*
* @param ErrorCollection $errorCollection
* @return bool
*/
private function isErrorAcceptable(ErrorCollection $errorCollection): bool
{
$errors = $errorCollection->deepAll();
// there is should be only one acceptable error
if (count($errors) > 1) {
return false;
}

/** @var Validation $error */
$error = array_pop($errors);

return (int)$error->code === self::$acceptableTransactionCode;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Braintree\Test\Unit\Gateway\Response;

use Magento\Braintree\Gateway\Response\CancelDetailsHandler;
use Magento\Braintree\Gateway\SubjectReader;
use Magento\Payment\Gateway\Data\OrderAdapterInterface;
use Magento\Payment\Gateway\Data\PaymentDataObject;
use Magento\Sales\Model\Order\Payment;
use PHPUnit\Framework\TestCase;
use PHPUnit_Framework_MockObject_MockObject as MockObject;

/**
* Tests \Magento\Braintree\Gateway\Response\CancelDetailsHandler.
*/
class CancelDetailsHandlerTest extends TestCase
{
/**
* @var CancelDetailsHandler
*/
private $handler;

/**
* @inheritdoc
*/
protected function setUp()
{
$this->handler = new CancelDetailsHandler(new SubjectReader());
}

/**
* Checks a case when cancel handler closes the current and parent transactions.
*
* @return void
*/
public function testHandle(): void
{
/** @var OrderAdapterInterface|MockObject $order */
$order = $this->getMockForAbstractClass(OrderAdapterInterface::class);
/** @var Payment|MockObject $payment */
$payment = $this->getMockBuilder(Payment::class)
->disableOriginalConstructor()
->setMethods(['setOrder'])
->getMock();

$paymentDO = new PaymentDataObject($order, $payment);
$response = [
'payment' => $paymentDO,
];

$this->handler->handle($response, []);

self::assertTrue($payment->getIsTransactionClosed(), 'The current transaction should be closed.');
self::assertTrue($payment->getShouldCloseParentTransaction(), 'The parent transaction should be closed.');
}
}
98 changes: 86 additions & 12 deletions app/code/Magento/Braintree/Test/Unit/Gateway/SubjectReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/
namespace Magento\Braintree\Test\Unit\Gateway;

use Braintree\Result\Successful;
use Braintree\Transaction;
use Magento\Braintree\Gateway\SubjectReader;

Expand All @@ -18,6 +19,9 @@ class SubjectReaderTest extends \PHPUnit\Framework\TestCase
*/
private $subjectReader;

/**
* @inheritdoc
*/
protected function setUp()
{
$this->subjectReader = new SubjectReader();
Expand All @@ -27,67 +31,137 @@ protected function setUp()
* @covers \Magento\Braintree\Gateway\SubjectReader::readCustomerId
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The "customerId" field does not exists
* @return void
*/
public function testReadCustomerIdWithException()
public function testReadCustomerIdWithException(): void
{
$this->subjectReader->readCustomerId([]);
}

/**
* @covers \Magento\Braintree\Gateway\SubjectReader::readCustomerId
* @return void
*/
public function testReadCustomerId()
public function testReadCustomerId(): void
{
$customerId = 1;
static::assertEquals($customerId, $this->subjectReader->readCustomerId(['customer_id' => $customerId]));
$this->assertEquals($customerId, $this->subjectReader->readCustomerId(['customer_id' => $customerId]));
}

/**
* @covers \Magento\Braintree\Gateway\SubjectReader::readPublicHash
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage The "public_hash" field does not exists
* @return void
*/
public function testReadPublicHashWithException()
public function testReadPublicHashWithException(): void
{
$this->subjectReader->readPublicHash([]);
}

/**
* @covers \Magento\Braintree\Gateway\SubjectReader::readPublicHash
* @return void
*/
public function testReadPublicHash()
public function testReadPublicHash(): void
{
$hash = 'fj23djf2o1fd';
static::assertEquals($hash, $this->subjectReader->readPublicHash(['public_hash' => $hash]));
$this->assertEquals($hash, $this->subjectReader->readPublicHash(['public_hash' => $hash]));
}

/**
* @covers \Magento\Braintree\Gateway\SubjectReader::readPayPal
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Transaction has't paypal attribute
* @return void
*/
public function testReadPayPalWithException()
public function testReadPayPalWithException(): void
{
$transaction = Transaction::factory([
'id' => 'u38rf8kg6vn'
'id' => 'u38rf8kg6vn',
]);
$this->subjectReader->readPayPal($transaction);
}

/**
* @covers \Magento\Braintree\Gateway\SubjectReader::readPayPal
* @return void
*/
public function testReadPayPal()
public function testReadPayPal(): void
{
$paypal = [
'paymentId' => '3ek7dk7fn0vi1',
'payerEmail' => 'payer@example.com'
'payerEmail' => 'payer@example.com',
];
$transaction = Transaction::factory([
'id' => '4yr95vb',
'paypal' => $paypal
'paypal' => $paypal,
]);

static::assertEquals($paypal, $this->subjectReader->readPayPal($transaction));
$this->assertEquals($paypal, $this->subjectReader->readPayPal($transaction));
}

/**
* Checks a case when subject reader retrieves successful Braintree transaction.
*
* @return void
*/
public function testReadTransaction(): void
{
$transaction = Transaction::factory(['id' => 1]);
$response = [
'object' => new Successful($transaction, 'transaction'),
];
$actual = $this->subjectReader->readTransaction($response);

$this->assertSame($transaction, $actual);
}

/**
* Checks a case when subject reader retrieves invalid data instead transaction details.
*
* @param array $response
* @param string $expectedMessage
* @dataProvider invalidTransactionResponseDataProvider
* @expectedException \InvalidArgumentException
* @return void
*/
public function testReadTransactionWithInvalidResponse(array $response, string $expectedMessage): void
{
$this->expectExceptionMessage($expectedMessage);
$this->subjectReader->readTransaction($response);
}

/**
* Gets list of variations with invalid subject data.
*
* @return array
*/
public function invalidTransactionResponseDataProvider(): array
{
$transaction = new \stdClass();
$response = new \stdClass();
$response->transaction = $transaction;

return [
[
'response' => [
'object' => [],
],
'expectedMessage' => 'Response object does not exist.',
],
[
'response' => [
'object' => new \stdClass(),
],
'expectedMessage' => 'The object is not a class \Braintree\Transaction.',
],
[
'response' => [
'object' => $response,
],
'expectedMessage' => 'The object is not a class \Braintree\Transaction.',
],
];
}
}
Loading