Skip to content

Commit

Permalink
Add unit tests coverage for c21a126
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Apr 7, 2020
1 parent c21a126 commit 165c797
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bundle/Tests/LegacyBundles/LegacyExtensionsLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function testGetExtensionDirectories()
[
vfsStream::url('eZ/TestBundle/ezpublish_legacy/extension1'),
vfsStream::url('eZ/TestBundle/ezpublish_legacy/extension2'),
vfsStream::url('eZ/TestBundle/ezpublish_legacy/extension3'),
],
$locator->getExtensionDirectories(vfsStream::url('eZ/TestBundle/'))
);
Expand All @@ -57,7 +58,7 @@ public function testGetExtensionsNames()

$bundle->expects($this->once())
->method('getLegacyExtensionsNames')
->willReturn(['extension3']);
->willReturn(['extension4']);

$locator = new LegacyExtensionsLocator($this->vfsRoot);

Expand All @@ -66,6 +67,7 @@ public function testGetExtensionsNames()
'extension1',
'extension2',
'extension3',
'extension4',
],
$locator->getExtensionNames($bundle)
);
Expand All @@ -78,7 +80,8 @@ protected function initVfs()
'TestBundle' => [
'ezpublish_legacy' => [
'extension1' => ['extension.xml' => ''],
'extension2' => ['extension.xml' => ''],
'extension2' => ['extension.xml' => '', 'ezinfo.php' => ''],
'extension3' => ['ezinfo.php' => ''],
'not_extension' => [],
],
'Resources' => ['config' => []],
Expand Down

0 comments on commit 165c797

Please sign in to comment.