Skip to content

Commit f803de5

Browse files
authored
Fixed unit test for \Magento\SampleData\Test\Unit\Model\DependencyTest
1 parent c69d533 commit f803de5

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

app/code/Magento/SampleData/Test/Unit/Model/DependencyTest.php

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Magento\Framework\Filesystem;
1515
use Magento\Framework\Phrase;
1616
use Magento\SampleData\Model\Dependency;
17+
use Magento\Framework\Filesystem\DriverPool;
1718

1819
class DependencyTest extends \PHPUnit\Framework\TestCase
1920
{
@@ -59,7 +60,7 @@ public function testPackagesFromComposerSuggest(
5960
$moduleDirectories
6061
);
6162

62-
$directoryReadFactory = $this->getMockBuilder(Filesystem\Directory\ReadInterfaceFactory::class)
63+
$directoryReadFactory = $this->getMockBuilder(Filesystem\Directory\ReadFactory::class)
6364
->disableOriginalConstructor()
6465
->setMethods(['create'])
6566
->getMock();
@@ -88,7 +89,8 @@ public static function dataPackagesFromComposerSuggest()
8889
'composerJsonGenerator' => function (DependencyTest $test) {
8990
return [
9091
[
91-
['path' => 'app/code/LocalModule'],
92+
'app/code/LocalModule',
93+
DriverPool::FILE,
9294
$test->stubComposerJsonReader(
9395
[
9496
'name' => 'local/module',
@@ -99,11 +101,13 @@ public static function dataPackagesFromComposerSuggest()
99101
)
100102
],
101103
[
102-
['path' => 'app/code/LocalModuleWithoutComposerJson'],
104+
'app/code/LocalModuleWithoutComposerJson',
105+
DriverPool::FILE,
103106
$test->stubFileNotFoundReader()
104107
],
105108
[
106-
['path' => 'vendor/company/module'],
109+
'vendor/company/module',
110+
DriverPool::FILE,
107111
$test->stubComposerJsonReader(
108112
[
109113
'name' => 'company/module',
@@ -114,7 +118,8 @@ public static function dataPackagesFromComposerSuggest()
114118
)
115119
],
116120
[
117-
['path' => 'vendor/company2/module/src/..'],
121+
'vendor/company2/module/src/..',
122+
DriverPool::FILE,
118123
$test->stubComposerJsonReader(
119124
[
120125
'name' => 'company2/module',
@@ -125,19 +130,23 @@ public static function dataPackagesFromComposerSuggest()
125130
)
126131
],
127132
[
128-
['path' => 'vendor/company2/module/src'],
133+
'vendor/company2/module/src',
134+
DriverPool::FILE,
129135
$test->stubFileNotFoundReader()
130136
],
131137
[
132-
['path' => 'vendor/company/module/..'],
138+
'vendor/company/module/..',
139+
DriverPool::FILE,
133140
$test->stubFileNotFoundReader()
134141
],
135142
[
136-
['path' => 'app/code/LocalModuleWithoutComposerJson/..'],
143+
'app/code/LocalModuleWithoutComposerJson/..',
144+
DriverPool::FILE,
137145
$test->stubFileNotFoundReader()
138146
],
139147
[
140-
['path' => 'app/code/LocalModule/..'],
148+
'app/code/LocalModule/..',
149+
DriverPool::FILE,
141150
$test->stubFileNotFoundReader()
142151
],
143152
];

0 commit comments

Comments
 (0)