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
Data
Test
Unit
Argument
Interpreter
ConstantTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Data\Test\Unit\Argument\Interpreter
;
7
8
use \Magento\Framework\Data\Argument\Interpreter\Constant;
9
10
class
ConstantTest
extends
\PHPUnit\Framework\TestCase
11
{
15
private
$object;
16
17
protected
function
setUp
()
18
{
19
$this->
object
=
new
Constant
();
20
}
21
22
public
function
testEvaluate
()
23
{
24
// it is defined in framework/bootstrap.php
25
$this->assertEquals(TESTS_TEMP_DIR, $this->object->evaluate([
'value'
=>
'TESTS_TEMP_DIR'
]));
26
}
27
33
public
function
testEvaluateBadValue
(
$value
)
34
{
35
$this->
object
->evaluate(
$value
);
36
}
37
41
public
function
evaluateBadValueDataProvider
()
42
{
43
return
[
44
[[
'value'
=>
'KNOWINGLY_UNDEFINED_CONSTANT'
]],
45
[[
'value'
=>
''
]],
46
[[]]
47
];
48
}
49
}
Magento\Framework\Data\Test\Unit\Argument\Interpreter\ConstantTest\setUp
setUp()
Definition:
ConstantTest.php:17
Magento\Framework\Data\Test\Unit\Argument\Interpreter\ConstantTest\testEvaluateBadValue
testEvaluateBadValue($value)
Definition:
ConstantTest.php:33
Magento\Framework\Data\Argument\Interpreter\Constant
Definition:
Constant.php:13
$value
$value
Definition:
gender.phtml:16
Magento\Framework\Data\Test\Unit\Argument\Interpreter
Definition:
ArrayTypeTest.php:6
Magento\Framework\Data\Test\Unit\Argument\Interpreter\ConstantTest
Definition:
ConstantTest.php:10
Magento\Framework\Data\Test\Unit\Argument\Interpreter\ConstantTest\evaluateBadValueDataProvider
evaluateBadValueDataProvider()
Definition:
ConstantTest.php:41
Magento\Framework\Data\Test\Unit\Argument\Interpreter\ConstantTest\testEvaluate
testEvaluate()
Definition:
ConstantTest.php:22