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
File
ConfigFilePoolTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Config\Test\Unit\File
;
8
9
use
Magento\Framework\Config\File\ConfigFilePool
;
10
11
class
ConfigFilePoolTest
extends
\PHPUnit\Framework\TestCase
12
{
16
private
$configFilePool;
17
18
protected
function
setUp
()
19
{
20
$newPath = [
21
'new_key'
=>
'new_config.php'
22
];
23
$this->configFilePool =
new
ConfigFilePool
($newPath);
24
}
25
26
public
function
testGetPaths
()
27
{
28
$expected[
'new_key'
] =
'new_config.php'
;
29
$expected[
ConfigFilePool::APP_CONFIG
] =
'config.php'
;
30
$expected[
ConfigFilePool::APP_ENV
] =
'env.php'
;
31
32
$this->assertEquals($expected, $this->configFilePool->getPaths());
33
}
34
35
public
function
testGetPath
()
36
{
37
$expected =
'config.php'
;
38
$this->assertEquals($expected, $this->configFilePool->getPath(
ConfigFilePool::APP_CONFIG
));
39
}
40
45
public
function
testGetPathException
()
46
{
47
$fileKey =
'not_existing'
;
48
$this->configFilePool->getPath($fileKey);
49
}
50
}
Magento\Framework\Config\File\ConfigFilePool\APP_CONFIG
const APP_CONFIG
Definition:
ConfigFilePool.php:16
Magento\Framework\Config\Test\Unit\File\ConfigFilePoolTest\testGetPathException
testGetPathException()
Definition:
ConfigFilePoolTest.php:45
Magento\Framework\Config\File\ConfigFilePool
Definition:
ConfigFilePool.php:14
Magento\Framework\Config\Test\Unit\File
Definition:
ConfigFilePoolTest.php:7
Magento\Framework\Config\Test\Unit\File\ConfigFilePoolTest\testGetPath
testGetPath()
Definition:
ConfigFilePoolTest.php:35
Magento\Framework\Config\Test\Unit\File\ConfigFilePoolTest\testGetPaths
testGetPaths()
Definition:
ConfigFilePoolTest.php:26
Magento\Framework\Config\Test\Unit\File\ConfigFilePoolTest\setUp
setUp()
Definition:
ConfigFilePoolTest.php:18
Magento\Framework\Config\File\ConfigFilePool\APP_ENV
const APP_ENV
Definition:
ConfigFilePool.php:17
Magento\Framework\Config\Test\Unit\File\ConfigFilePoolTest
Definition:
ConfigFilePoolTest.php:11