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-catalog
Test
Unit
Model
Config
Source
ListPerPageTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Catalog\Test\Unit\Model\Config\Source
;
7
8
use
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
;
9
10
class
ListPerPageTest
extends
\PHPUnit\Framework\TestCase
11
{
15
private
$model;
16
17
protected
function
setUp
()
18
{
19
$helper
=
new
ObjectManager
($this);
20
$this->model =
$helper
->getObject(
21
\
Magento
\Catalog\Model\
Config
\Source\ListPerPage::class,
22
[
'options'
=>
'some,test,options'
]
23
);
24
}
25
26
public
function
testToOptionArray
()
27
{
28
$expect = [
29
[
'value'
=>
'some'
,
'label'
=>
'some'
],
30
[
'value'
=>
'test'
,
'label'
=>
'test'
],
31
[
'value'
=>
'options'
,
'label'
=>
'options'
],
32
];
33
34
$this->assertEquals($expect, $this->model->toOptionArray());
35
}
36
}
$helper
$helper
Definition:
iframe.phtml:13
Magento\Catalog\Test\Unit\Model\Config\Source
Definition:
CategoryTest.php:6
Magento\Catalog\Test\Unit\Model\Config\Source\ListPerPageTest\testToOptionArray
testToOptionArray()
Definition:
ListPerPageTest.php:26
Magento
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
Definition:
ObjectManager.php:13
Magento\Catalog\Test\Unit\Model\Config\Source\ListPerPageTest\setUp
setUp()
Definition:
ListPerPageTest.php:17
Magento\Catalog\Test\Unit\Model\Config\Source\ListPerPageTest
Definition:
ListPerPageTest.php:10
Magento\Framework\App\ResourceConnection\Config
Definition:
Config.php:14