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
Model
ResourceModel
Grid
GroupListTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Payment\Test\Unit\Model\ResourceModel\Grid
;
8
9
class
GroupListTest
extends
\PHPUnit\Framework\TestCase
10
{
14
protected
$groupArrayModel
;
15
19
protected
$helperMock
;
20
21
protected
function
setUp
()
22
{
23
$this->helperMock = $this->createMock(\
Magento
\
Payment
\Helper\Data::class);
24
$this->groupArrayModel = new \Magento\Payment\Model\ResourceModel\Grid\GroupList($this->helperMock);
25
}
26
27
public
function
testToOptionArray
()
28
{
29
$this->helperMock
30
->expects($this->once())
31
->method(
'getPaymentMethodList'
)
32
->with(
true
,
true
,
true
)
33
->will($this->returnValue([
'group data'
]));
34
$this->assertEquals([
'group data'
], $this->groupArrayModel->toOptionArray());
35
}
36
}
Magento\Payment\Test\Unit\Model\ResourceModel\Grid\GroupListTest\setUp
setUp()
Definition:
GroupListTest.php:21
Magento\Payment\Test\Unit\Model\ResourceModel\Grid\GroupListTest\testToOptionArray
testToOptionArray()
Definition:
GroupListTest.php:27
Magento\Payment\Test\Unit\Model\ResourceModel\Grid\GroupListTest
Definition:
GroupListTest.php:9
Magento\Payment\Test\Unit\Model\ResourceModel\Grid\GroupListTest\$helperMock
$helperMock
Definition:
GroupListTest.php:19
Magento\Quote\Model\Quote\Payment
Definition:
Payment.php:37
Magento\Payment\Test\Unit\Model\ResourceModel\Grid\GroupListTest\$groupArrayModel
$groupArrayModel
Definition:
GroupListTest.php:14
Magento
Magento\Payment\Test\Unit\Model\ResourceModel\Grid
Definition:
GroupListTest.php:7