Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-payment
Test
Unit
Gateway
Data
PaymentDataObjectTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Payment\Test\Unit\Gateway\Data
;
7
8
use
Magento\Payment\Gateway\Data\PaymentDataObject
;
9
use
Magento\Payment\Gateway\Data\OrderAdapterInterface
;
10
use
Magento\Payment\Model\InfoInterface
;
11
15
class
PaymentDataObjectTest
extends
\PHPUnit\Framework\TestCase
16
{
18
protected
$model
;
19
23
protected
$orderMock
;
24
28
protected
$paymentMock
;
29
30
protected
function
setUp
()
31
{
32
$this->orderMock = $this->getMockBuilder(\
Magento
\
Payment
\Gateway\
Data
\OrderAdapterInterface::class)
33
->getMockForAbstractClass();
34
35
$this->paymentMock = $this->getMockBuilder(\
Magento
\
Payment
\Model\InfoInterface::class)
36
->getMockForAbstractClass();
37
38
$this->model =
new
PaymentDataObject
($this->orderMock, $this->paymentMock);
39
}
40
41
public
function
testGetOrder
()
42
{
43
$this->assertSame($this->orderMock, $this->model->getOrder()) ;
44
}
45
46
public
function
testGetPayment
()
47
{
48
$this->assertSame($this->paymentMock, $this->model->getPayment()) ;
49
}
50
}
Magento\Payment\Gateway\Data\PaymentDataObject
Definition:
PaymentDataObject.php:10
Magento\Payment\Test\Unit\Gateway\Data\PaymentDataObjectTest\testGetPayment
testGetPayment()
Definition:
PaymentDataObjectTest.php:46
Magento\Payment\Test\Unit\Gateway\Data\PaymentDataObjectTest\$model
$model
Definition:
PaymentDataObjectTest.php:18
Magento\Payment\Gateway\Data\OrderAdapterInterface
Definition:
OrderAdapterInterface.php:13
Magento\Payment\Helper\Data
Definition:
Data.php:25
Magento
Magento\Payment\Test\Unit\Gateway\Data\PaymentDataObjectTest\testGetOrder
testGetOrder()
Definition:
PaymentDataObjectTest.php:41
Magento\Payment\Test\Unit\Gateway\Data
Magento\Payment\Test\Unit\Gateway\Data\PaymentDataObjectTest\$paymentMock
$paymentMock
Definition:
PaymentDataObjectTest.php:28
Magento\Sales\Model\Order\Payment
Definition:
Payment.php:28
Magento\Payment\Test\Unit\Gateway\Data\PaymentDataObjectTest
Definition:
PaymentDataObjectTest.php:15
Magento\Payment\Model\InfoInterface
Definition:
InfoInterface.php:14
Magento\Payment\Test\Unit\Gateway\Data\PaymentDataObjectTest\setUp
setUp()
Definition:
PaymentDataObjectTest.php:30
Magento\Payment\Test\Unit\Gateway\Data\PaymentDataObjectTest\$orderMock
$orderMock
Definition:
PaymentDataObjectTest.php:23