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-ui
Test
Unit
Config
Converter
DepsTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Ui\Test\Unit\Config\Converter
;
7
8
use
Magento\Framework\Data\Argument\Interpreter\Composite
;
9
use
Magento\Ui\Config\Converter\Deps
;
10
use
Magento\Ui\Config\ConverterUtils
;
11
12
class
DepsTest
extends
\PHPUnit\Framework\TestCase
13
{
17
private
$converter;
18
19
public
function
setUp
()
20
{
21
$this->converter =
new
Deps
(
new
ConverterUtils
());
22
}
23
24
public
function
testConvert
()
25
{
26
$expectedResult = [
27
'name'
=>
'deps'
,
28
'xsi:type'
=>
'array'
,
29
'item'
=> [
30
[
31
'name'
=> 0,
32
'xsi:type'
=>
'string'
,
33
'value'
=>
'test-dep'
,
34
],
35
[
36
'name'
=> 1,
37
'xsi:type'
=>
'string'
,
38
'value'
=>
'test-dep-two'
,
39
],
40
],
41
];
42
$dom = new \DOMDocument(
'1.0'
,
'UTF-8'
);
43
$dom->load(dirname(
__FILE__
) . DIRECTORY_SEPARATOR .
'_files'
. DIRECTORY_SEPARATOR .
'test.xml'
);
44
$domXpath = new \DOMXPath($dom);
45
$deps = $domXpath->query(
'//listing/settings/deps'
)->item(0);
46
$this->assertEquals($expectedResult, $this->converter->convert($deps));
47
}
48
}
Magento\Ui\Config\Converter\Deps
Definition:
Deps.php:16
Magento\Framework\Data\Argument\Interpreter\Composite
Definition:
Composite.php:13
Magento\Ui\Test\Unit\Config\Converter\DepsTest
Definition:
DepsTest.php:12
Magento\Ui\Test\Unit\Config\Converter
Definition:
ActionsTest.php:7
Magento\Ui\Config\ConverterUtils
Definition:
ConverterUtils.php:11
__FILE__
defined('MTF_BOOT_FILE')||define('MTF_BOOT_FILE' __FILE__
Definition:
bootstrap.php:7
Magento\Ui\Test\Unit\Config\Converter\DepsTest\setUp
setUp()
Definition:
DepsTest.php:19
Magento\Ui\Test\Unit\Config\Converter\DepsTest\testConvert
testConvert()
Definition:
DepsTest.php:24