14 $this->assertEmpty(
$model->getDependencyInfo(
'any',
'not layout',
'any',
$content));
25 $this->assertEquals($expected,
$model->getDependencyInfo(
'Magento\SomeModule',
'layout',
'any',
$contents));
32 '<element module="Magento\AnotherModule"/>',
35 'module' =>
'Magento\AnotherModule',
37 'source' =>
'<element module="Magento\AnotherModule"/>',
41 [
'<element module="Magento\SomeModule"/>', []],
43 '<block class="Magento\AnotherModule\Several\Chunks"/>',
46 'module' =>
'Magento\AnotherModule',
48 'source' =>
'<block class="Magento\AnotherModule\Several\Chunks"/>',
52 [
'<block class="Magento\SomeModule\Several\Chunks"/>', []],
55 <extra></extra><block template="Magento_AnotherModule::template/path.phtml"/> 59 'module' =>
'Magento\AnotherModule',
61 'source' =>
'<block template="Magento_AnotherModule::template/path.phtml"/>',
65 [
'<block template="Magento_SomeModule::template/path.phtml"/>', []],
67 '<block>Magento\AnotherModule\Several\Chunks</block>',
70 'module' =>
'Magento\AnotherModule',
72 'source' =>
'<block>Magento\AnotherModule\Several\Chunks</block>',
76 [
'<block>Magento\SomeModule\Several\Chunks</block>', []],
78 '<template>Magento_AnotherModule::template/path.phtml</template>',
81 'module' =>
'Magento\AnotherModule',
83 'source' =>
'<template>Magento_AnotherModule::template/path.phtml</template>',
87 [
'<template>Magento_SomeModule::template/path.phtml</template>', []],
89 '<file>Magento_AnotherModule::file/path.txt</file>',
92 'module' =>
'Magento\AnotherModule',
94 'source' =>
'<file>Magento_AnotherModule::file/path.txt</file>',
98 [
'<file>Magento_SomeModule::file/path.txt</file>', []],
100 '<any helper="Magento\AnotherModule\Several\Chunks::text"/>',
103 'module' =>
'Magento\AnotherModule',
105 'source' =>
'<any helper="Magento\AnotherModule\Several\Chunks::text"/>',
109 [
'<any helper="Magento\SomeModule\Several\Chunks::text"/>', []]
120 $model =
new LayoutRule([
'router_name' => [
'Magento\RouterModule']], [], []);
121 $this->assertEquals([],
$model->getDependencyInfo(
'Magento\RouterModule',
'layout',
'any',
$contents));
123 [[
'module' =>
'Magento\RouterModule',
'type' =>
$type,
'source' =>
'router_name_action']],
124 $model->getDependencyInfo(
'Magento\AnotherModule',
'layout',
'any',
$contents)
138 'frontend' => [
'any_handle_name' => [
'Magento\AnyHandleModule' =>
'Magento\AnyHandleModule']],
139 'default' => [
'singlechunk' => [
'Magento\DefaultHandleModule' =>
'Magento\DefaultHandleModule']],
144 $model->getDependencyInfo(
'Magento\AnyHandleModule',
'layout',
'path/frontend/file.txt',
$contents)
148 $model->getDependencyInfo(
'Magento\DefaultHandleModule',
'layout',
'any',
$contents)
151 [[
'module' =>
'Magento\DefaultHandleModule',
'type' =>
$type,
'source' =>
'singlechunk']],
155 [[
'module' =>
'Magento\AnyHandleModule',
'type' =>
$type,
'source' =>
'any_handle_name']],
156 $model->getDependencyInfo(
'any',
'layout',
'path/frontend/file.txt',
$contents)
161 'any_handle_name' => [
162 'Magento\Theme' =>
'Magento\Theme',
163 'Magento\HandleModule' =>
'Magento\HandleModule',
169 [[
'module' =>
'Magento\Theme',
'type' =>
$type,
'source' =>
'any_handle_name']],
170 $model->getDependencyInfo(
'any',
'layout',
'path/frontend/file.txt',
$contents)
174 $model->getDependencyInfo(
'Magento\HandleModule',
'layout',
'path/frontend/file.txt',
$contents)
206 \
Magento\Test\Integrity\DependencyTest::TYPE_SOFT,
testLayoutGetDependencyInfo($contents, $type, $isHandle)
layoutGetDependencyInfoWithReferenceDataProvider()
defined('TESTS_BP')||define('TESTS_BP' __DIR__
layoutGetDependencyInfoDataProvider()
testGetDependencyInfo($contents, array $expected)
_getLayoutFileContent($fileName)
testUpdatesRouterGetDependencyInfo($contents, $type)
getDependencyInfoDataProvider()
testNonLayoutGetDependencyInfo()