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-customer
Test
Unit
CustomerData
SectionConfigConverterTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Customer\Test\Unit\CustomerData
;
8
9
use
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
as ObjectManagerHelper;
10
11
class
SectionConfigConverterTest
extends
\PHPUnit\Framework\TestCase
12
{
14
protected
$converter
;
15
17
protected
$objectManagerHelper
;
18
20
protected
$source
;
21
22
protected
function
setUp
()
23
{
24
$this->source = new \DOMDocument();
25
$this->objectManagerHelper =
new
ObjectManagerHelper($this);
26
$this->converter = $this->objectManagerHelper->getObject(
27
\
Magento
\Customer\CustomerData\SectionConfigConverter::class
28
);
29
}
30
31
public
function
testConvert
()
32
{
33
$this->source->loadXML(
file_get_contents
(
__DIR__
.
'/_files/sections.xml'
));
34
35
$this->assertEquals(
36
[
37
'sections'
=> [
38
'customer/account/logout'
=>
'*'
,
39
'customer/account/editpost'
=> [
'account'
],
40
],
41
],
42
$this->converter->convert($this->source)
43
);
44
}
45
}
Magento\Customer\Test\Unit\CustomerData\SectionConfigConverterTest\$objectManagerHelper
$objectManagerHelper
Definition:
SectionConfigConverterTest.php:17
Magento\Customer\Test\Unit\CustomerData\SectionConfigConverterTest
Definition:
SectionConfigConverterTest.php:11
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
Magento\Customer\Test\Unit\CustomerData\SectionConfigConverterTest\$converter
$converter
Definition:
SectionConfigConverterTest.php:14
Magento\Customer\Test\Unit\CustomerData\SectionConfigConverterTest\$source
$source
Definition:
SectionConfigConverterTest.php:20
Magento\Customer\Test\Unit\CustomerData
Magento\Customer\Test\Unit\CustomerData\SectionConfigConverterTest\testConvert
testConvert()
Definition:
SectionConfigConverterTest.php:31
Magento
Magento\Framework\TestFramework\Unit\Helper\ObjectManager
Definition:
ObjectManager.php:13
Magento\Framework\Filesystem\Driver\file_get_contents
file_get_contents()
Definition:
http_mock.php:15
Magento\Customer\Test\Unit\CustomerData\SectionConfigConverterTest\setUp
setUp()
Definition:
SectionConfigConverterTest.php:22