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
magento2-base
setup
src
Magento
Setup
Test
Unit
Module
Di
Compiler
Config
Chain
BackslashTrimTest.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Setup\Test\Unit\Module\Di\Compiler\Config\Chain
;
8
9
use \Magento\Setup\Module\Di\Compiler\Config\Chain\BackslashTrim;
10
11
class
BackslashTrimTest
extends
\PHPUnit\Framework\TestCase
12
{
13
public
function
testModifyArgumentsDoNotExist
()
14
{
15
$inputConfig = [
16
'data'
=> []
17
];
18
$modifier =
new
BackslashTrim
();
19
$this->assertSame($inputConfig, $modifier->modify($inputConfig));
20
}
21
22
public
function
testModifyArguments
()
23
{
24
$modifier =
new
BackslashTrim
();
25
$this->assertEquals($this->getOutputConfig(), $modifier->modify($this->getInputConfig()));
26
}
27
33
private
function
getInputConfig()
34
{
35
return
[
36
'arguments'
=> [
37
'\\Class'
=> [
38
'argument_type'
=> [
'_i_'
=>
'\\Class\\Dependency'
],
39
'argument_not_shared'
=> [
'_ins_'
=>
'\\Class\\Dependency'
],
40
'array'
=> [
41
'argument_type'
=> [
'_i_'
=>
'\\Class\\Dependency'
],
42
'argument_not_shared'
=> [
'_ins_'
=>
'\\Class\\Dependency'
],
43
'array'
=> [
44
'argument_type'
=> [
'_i_'
=>
'\\Class\\Dependency'
],
45
'argument_not_shared'
=> [
'_ins_'
=>
'\\Class\\Dependency'
],
46
]
47
]
48
]
49
]
50
];
51
}
52
58
private
function
getOutputConfig()
59
{
60
return
[
61
'arguments'
=> [
62
'Class'
=> [
63
'argument_type'
=> [
'_i_'
=>
'Class\\Dependency'
],
64
'argument_not_shared'
=> [
'_ins_'
=>
'Class\\Dependency'
],
65
'array'
=> [
66
'argument_type'
=> [
'_i_'
=>
'Class\\Dependency'
],
67
'argument_not_shared'
=> [
'_ins_'
=>
'Class\\Dependency'
],
68
'array'
=> [
69
'argument_type'
=> [
'_i_'
=>
'Class\\Dependency'
],
70
'argument_not_shared'
=> [
'_ins_'
=>
'Class\\Dependency'
],
71
]
72
]
73
]
74
]
75
];
76
}
77
}
Magento\Setup\Module\Di\Compiler\Config\Chain\BackslashTrim
Definition:
BackslashTrim.php:11
Magento\Setup\Test\Unit\Module\Di\Compiler\Config\Chain\BackslashTrimTest\testModifyArgumentsDoNotExist
testModifyArgumentsDoNotExist()
Definition:
BackslashTrimTest.php:13
Magento\Setup\Test\Unit\Module\Di\Compiler\Config\Chain\BackslashTrimTest\testModifyArguments
testModifyArguments()
Definition:
BackslashTrimTest.php:22
Magento\Setup\Test\Unit\Module\Di\Compiler\Config\Chain
Definition:
ArgumentsSerializationTest.php:7
Magento\Setup\Test\Unit\Module\Di\Compiler\Config\Chain\BackslashTrimTest
Definition:
BackslashTrimTest.php:11