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
Config
Source
AllmethodsTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Payment\Test\Unit\Model\Config\Source
;
8
9
use \Magento\Payment\Model\Config\Source\Allmethods;
10
11
class
AllmethodsTest
extends
\PHPUnit\Framework\TestCase
12
{
18
protected
$_paymentData
;
19
23
protected
$_model
;
24
25
protected
function
setUp
()
26
{
27
$this->_paymentData = $this->getMockBuilder(
28
\
Magento
\
Payment
\Helper\Data::class
29
)->disableOriginalConstructor()->setMethods([])->getMock();
30
31
$this->_model =
new
Allmethods
($this->_paymentData);
32
}
33
34
public
function
testToOptionArray
()
35
{
36
$expectedArray = [
'key'
=>
'value'
];
37
$this->_paymentData->expects($this->once())
38
->method(
'getPaymentMethodList'
)
39
->with(
true
,
true
,
true
)
40
->will($this->returnValue($expectedArray));
41
$this->assertEquals($expectedArray, $this->_model->toOptionArray());
42
}
43
}
Magento\Payment\Test\Unit\Model\Config\Source\AllmethodsTest
Definition:
AllmethodsTest.php:11
Magento\Payment\Test\Unit\Model\Config\Source\AllmethodsTest\$_paymentData
$_paymentData
Definition:
AllmethodsTest.php:18
Magento\Payment\Test\Unit\Model\Config\Source\AllmethodsTest\testToOptionArray
testToOptionArray()
Definition:
AllmethodsTest.php:34
Magento\Payment\Test\Unit\Model\Config\Source
Definition:
AllmethodsTest.php:7
Magento\Payment\Test\Unit\Model\Config\Source\AllmethodsTest\$_model
$_model
Definition:
AllmethodsTest.php:23
Magento\Payment\Test\Unit\Model\Config\Source\AllmethodsTest\setUp
setUp()
Definition:
AllmethodsTest.php:25
Magento\Quote\Model\Quote\Payment
Definition:
Payment.php:37
Magento
Magento\Payment\Model\Config\Source\Allmethods
Definition:
Allmethods.php:8