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
dev
tests
static
framework
tests
unit
testsuite
Magento
TestFramework
Dependency
DbRuleTest.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\TestFramework\Dependency
;
7
8
class
DbRuleTest
extends
\PHPUnit\Framework\TestCase
9
{
13
protected
$model
;
14
15
protected
function
setUp
()
16
{
17
$this->model =
new
DbRule
([
'some_table'
=>
'SomeModule'
]);
18
}
19
27
public
function
testGetDependencyInfo
($module, $file,
$contents
, array $expected)
28
{
29
$this->assertEquals($expected, $this->model->getDependencyInfo($module,
'php'
, $file,
$contents
));
30
}
31
32
public
function
getDependencyInfoDataProvider
()
33
{
34
return
[
35
[
'any'
,
'non-resource-file-path.php'
,
'any'
, []],
36
[
37
'any'
,
38
'/app/some/path/Setup/some-file.php'
,
39
'$install->getTableName("unknown_table")'
,
40
[[
'module'
=>
'Unknown'
,
'source'
=>
'unknown_table'
]]
41
],
42
[
43
'SomeModule'
,
44
'/app/some/path/Resource/Setup.php'
,
45
'$install->getTableName("some_table")'
,
46
[]
47
],
48
[
49
'any'
,
50
'/app/some/path/Resource/Setup.php'
,
51
'$install->getTableName("some_table")'
,
52
[
53
[
54
'module'
=>
'SomeModule'
,
55
'type'
=>
\Magento\TestFramework\Dependency\RuleInterface::TYPE_HARD
,
56
'source'
=>
'some_table'
,
57
]
58
]
59
]
60
];
61
}
62
}
Magento\TestFramework\Dependency\DbRuleTest\testGetDependencyInfo
testGetDependencyInfo($module, $file, $contents, array $expected)
Definition:
DbRuleTest.php:27
$contents
$contents
Definition:
website.php:14
Magento\TestFramework\Dependency\DbRuleTest
Definition:
DbRuleTest.php:8
Magento\TestFramework\Dependency\RuleInterface\TYPE_HARD
const TYPE_HARD
Definition:
RuleInterface.php:17
Magento\TestFramework\Dependency\DbRuleTest\setUp
setUp()
Definition:
DbRuleTest.php:15
Magento\TestFramework\Dependency\DbRuleTest\getDependencyInfoDataProvider
getDependencyInfoDataProvider()
Definition:
DbRuleTest.php:32
Magento\TestFramework\Dependency\DbRuleTest\$model
$model
Definition:
DbRuleTest.php:13
Magento\TestFramework\Dependency
Definition:
DbRule.php:8
Magento\TestFramework\Dependency\DbRule
Definition:
DbRule.php:10