Skip to content

Commit

Permalink
Fix static and integration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalevanec committed Apr 5, 2019
1 parent 12498b5 commit 2a343dd
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/code/Magento/Sales/Model/Order/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ public function refund($creditmemo)
$gateway->refund($this, $baseAmountToRefund);

$creditmemo->setTransactionId($this->getLastTransId());
// phpcs:ignore Magento2.Exceptions.ThrowCatch
} catch (\Magento\Framework\Exception\LocalizedException $e) {
if (!$captureTxn) {
throw new \Magento\Framework\Exception\LocalizedException(
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Sales/Model/RefundOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Sales\Model;

use Magento\Framework\App\ResourceConnection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Sales\Test\Unit\Model\Order;

use Magento\Framework\Model\Context;
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/Sales/Test/Unit/Model/RefundOrderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Sales\Test\Unit\Model;

use Magento\Framework\App\ResourceConnection;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Sales\Service\V1;

use Magento\Sales\Model\Order;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
use Magento\Framework\App\Request\Http as HttpRequest;
use Magento\Sales\Api\Data\OrderItemInterface;
use Magento\Sales\Model\Order;
use Magento\TestFramework\TestCase\AbstractBackendController;
use PHPUnit\Framework\Constraint\StringContains;

/**
* Provide tests for CreditMemo save controller.
*
* @magentoDbIsolation enabled
* @magentoAppArea adminhtml
* @magentoDataFixture Magento/Sales/_files/invoice.php
*/
class SaveTest extends AbstractBackendController
class SaveTest extends AbstractCreditmemoControllerTest
{
/**
* @var string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Magento\Sales\Model\Order\Status;
use Magento\TestFramework\Helper\Bootstrap;

// phpcs:ignore Magento2.Security.IncludeFile
require 'invoice.php';

$orderStatus = Bootstrap::getObjectManager()->create(Status::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Magento\Sales\Model\Order\Status;
use Magento\TestFramework\Helper\Bootstrap;

// phpcs:ignore Magento2.Security.IncludeFile
require 'default_rollback.php';

/** @var Status $orderStatus */
Expand Down

0 comments on commit 2a343dd

Please sign in to comment.