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
I18n
Parser
AbstractParserTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Setup\Test\Unit\Module\I18n\Parser
;
7
8
class
AbstractParserTest
extends
\PHPUnit\Framework\TestCase
9
{
13
protected
$_parserMock
;
14
15
protected
function
setUp
()
16
{
17
$this->_parserMock = $this->getMockForAbstractClass(
18
\
Magento
\
Setup
\
Module
\I18n\
Parser
\AbstractParser::class,
19
[],
20
''
,
21
false
22
);
23
}
24
30
public
function
testValidateOptions
(
$options
,
$message
)
31
{
32
$this->expectException(
'InvalidArgumentException'
);
33
$this->expectExceptionMessage(
$message
);
34
35
$this->_parserMock->addAdapter(
36
'php'
,
37
$this->createMock(\
Magento
\
Setup
\
Module
\I18n\
Parser
\AdapterInterface::class)
38
);
39
$this->_parserMock->parse(
$options
);
40
}
41
45
public
function
dataProviderForValidateOptions
()
46
{
47
return
[
48
[[[
'paths'
=> []]],
'Missed "type" in parser options.'
],
49
[[[
'type'
=>
''
,
'paths'
=> []]],
'Missed "type" in parser options.'
],
50
[
51
[[
'type'
=>
'wrong_type'
,
'paths'
=> []]],
52
'Adapter is not set for type "wrong_type".'
53
],
54
[[[
'type'
=>
'php'
]],
'"paths" in parser options must be array.'
],
55
[[[
'type'
=>
'php'
,
'paths'
=>
''
]],
'"paths" in parser options must be array.'
]
56
];
57
}
58
59
public
function
getPhrases
()
60
{
61
$this->assertInternalType(
'array'
, $this->_parserMock->getPhrases());
62
}
63
}
Magento\Setup\Test\Unit\Module\I18n\Parser
Definition:
AbstractParserTest.php:6
Magento\Setup\Module\I18n\Parser
Magento\Setup\Module
Definition:
Module.php:17
Magento\Setup\Test\Unit\Module\I18n\Parser\AbstractParserTest\$_parserMock
$_parserMock
Definition:
AbstractParserTest.php:13
Magento\Setup\Module\Setup
Definition:
Setup.php:14
Magento\Setup\Test\Unit\Module\I18n\Parser\AbstractParserTest\testValidateOptions
testValidateOptions($options, $message)
Definition:
AbstractParserTest.php:30
Magento\Setup\Test\Unit\Module\I18n\Parser\AbstractParserTest\dataProviderForValidateOptions
dataProviderForValidateOptions()
Definition:
AbstractParserTest.php:45
$message
$message
Definition:
notifications.php:7
Magento\Setup\Test\Unit\Module\I18n\Parser\AbstractParserTest\setUp
setUp()
Definition:
AbstractParserTest.php:15
Magento\Setup\Test\Unit\Module\I18n\Parser\AbstractParserTest
Definition:
AbstractParserTest.php:8
Magento
Magento\Setup\Test\Unit\Module\I18n\Parser\AbstractParserTest\getPhrases
getPhrases()
Definition:
AbstractParserTest.php:59
$options
$options
Definition:
multiple_mixed_products.php:29