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
framework
Config
Test
Unit
ReaderTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Config\Test\Unit
;
7
8
use
Magento\Framework\App\Config\Reader\Source\SourceInterface
;
9
use
Magento\Framework\App\Config\Scope\Converter
;
10
use
Magento\Framework\Config\Reader
;
11
use
Magento\Framework\Stdlib\ArrayUtils
;
12
13
class
ReaderTest
extends
\PHPUnit\Framework\TestCase
14
{
18
private
$source;
19
23
private
$reader;
24
25
public
function
setUp
()
26
{
27
$this->source = $this->getMockBuilder(SourceInterface::class)
28
->getMockForAbstractClass();
29
$this->reader =
new
Reader
([[
'class'
=> $this->source]]);
30
}
31
32
public
function
testRead
()
33
{
34
$config
= [
35
'default'
=> [
36
'general/locale/code'
=>
'ru_RU'
,
37
'general/locale/timezone'
=>
'America/Chicago'
,
38
]
39
];
40
$this->source->expects($this->once())
41
->method(
'get'
)
42
->with(
null
)
43
->willReturn(
$config
);
44
$this->assertEquals(
$config
, $this->reader->read());
45
}
46
}
Magento\Framework\Config\Test\Unit\ReaderTest\setUp
setUp()
Definition:
ReaderTest.php:25
$config
$config
Definition:
fraud_order.php:17
Magento\Framework\App\Config\Reader\Source\SourceInterface
Definition:
SourceInterface.php:13
Magento\Framework\Stdlib\ArrayUtils
Definition:
ArrayUtils.php:14
Magento\Framework\Config\Test\Unit\ReaderTest
Definition:
ReaderTest.php:13
Magento\Framework\Config\Test\Unit\ReaderTest\testRead
testRead()
Definition:
ReaderTest.php:32
Magento\Framework\Config\Reader
Definition:
Filesystem.php:10
Magento\Framework\Config\Test\Unit
Magento\Framework\App\Config\Scope\Converter
Definition:
Converter.php:10
Magento\Framework\Config\Reader
Definition:
Reader.php:15