Skip to content

Commit 44cbc35

Browse files
committed
MC-16922: Create an end-to-end test SetPaymentMethodOnCart for the authorize.net payment method
- updated merge conflicts
1 parent 3b9aee5 commit 44cbc35

File tree

2 files changed

+4
-28
lines changed

2 files changed

+4
-28
lines changed

dev/tests/integration/testsuite/Magento/AuthorizenetGraphQl/Model/Resolver/Customer/SetAuthorizeNetPaymentMethodOnCartTest.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId;
1414
use Magento\Integration\Api\CustomerTokenServiceInterface;
1515
use Magento\TestFramework\Helper\Bootstrap;
16+
use PHPUnit\Framework\TestCase;
1617

1718
/**
1819
* Tests SetPaymentMethod mutation for customer via authorizeNet payment
@@ -21,7 +22,7 @@
2122
* @magentoDbIsolation disabled
2223
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2324
*/
24-
class SetAuthorizenetPaymentMethodOnCustomerCartTest extends \Magento\TestFramework\Indexer\TestCase
25+
class SetAuthorizenetPaymentMethodOnCartTest extends TestCase
2526
{
2627
const CONTENT_TYPE = 'application/json';
2728

@@ -44,19 +45,6 @@ class SetAuthorizenetPaymentMethodOnCustomerCartTest extends \Magento\TestFramew
4445
/** @var Http */
4546
private $request;
4647

47-
public static function setUpBeforeClass()
48-
{
49-
$db = Bootstrap::getInstance()->getBootstrap()
50-
->getApplication()
51-
->getDbInstance();
52-
if (!$db->isDbDumpExists()) {
53-
throw new \LogicException('DB dump does not exist.');
54-
}
55-
$db->restoreFromDbDump();
56-
57-
parent::setUpBeforeClass();
58-
}
59-
6048
protected function setUp() : void
6149
{
6250
$this->objectManager = Bootstrap::getObjectManager();

dev/tests/integration/testsuite/Magento/AuthorizenetGraphQl/Model/Resolver/Guest/SetAuthorizeNetPaymentMethodOnCartTest.php

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use Magento\GraphQl\Controller\GraphQl;
1313
use Magento\GraphQl\Quote\GetMaskedQuoteIdByReservedOrderId;
1414
use Magento\TestFramework\Helper\Bootstrap;
15+
use PHPUnit\Framework\TestCase;
1516

1617
/**
1718
* Tests SetPaymentMethod mutation for guest via authorizeNet payment
@@ -20,7 +21,7 @@
2021
* @magentoDbIsolation disabled
2122
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2223
*/
23-
class SetAuthorizeNetPaymentMethodOnGuestCartTest extends \Magento\TestFramework\Indexer\TestCase
24+
class SetAuthorizeNetPaymentMethodOnCartTest extends TestCase
2425
{
2526
const CONTENT_TYPE = 'application/json';
2627

@@ -39,19 +40,6 @@ class SetAuthorizeNetPaymentMethodOnGuestCartTest extends \Magento\TestFramework
3940
/** @var Http */
4041
private $request;
4142

42-
public static function setUpBeforeClass()
43-
{
44-
$db = Bootstrap::getInstance()->getBootstrap()
45-
->getApplication()
46-
->getDbInstance();
47-
if (!$db->isDbDumpExists()) {
48-
throw new \LogicException('DB dump does not exist.');
49-
}
50-
$db->restoreFromDbDump();
51-
52-
parent::setUpBeforeClass();
53-
}
54-
5543
protected function setUp() : void
5644
{
5745
$this->objectManager = Bootstrap::getObjectManager();

0 commit comments

Comments
 (0)