Skip to content

Commit b163a69

Browse files
committed
MAGETWO-38844: Contribution of Ogres Sprint 31
- fixed unit test - suppressed static test
1 parent 548487f commit b163a69

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/internal/Magento/Framework/Module/ModuleList/Loader.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
/**
1717
* Loader of module list information from the filesystem
18+
*
19+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
1820
*/
1921
class Loader
2022
{

lib/internal/Magento/Framework/Module/Test/Unit/ModuleList/LoaderTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,16 @@ public function testLoadExclude()
122122
['c', null, null, self::$sampleXml],
123123
['d', null, null, self::$sampleXml],
124124
]));
125+
$this->registry->expects($this->once())
126+
->method('getModulePaths')
127+
->willReturn([]);
125128
$this->converter->expects($this->at(0))->method('convert')->willReturn(['a' => $fixture['a']]);
126129
$this->converter->expects($this->at(1))->method('convert')->willReturn(['b' => $fixture['b']]);
127130
$this->converter->expects($this->at(2))->method('convert')->willReturn(['c' => $fixture['c']]);
128131
$this->converter->expects($this->at(3))->method('convert')->willReturn(['d' => $fixture['d']]);
129-
$this->parser->expects($this->once())->method('initErrorHandler');
130132
$this->parser->expects($this->atLeastOnce())->method('loadXML');
131133
$this->parser->expects($this->atLeastOnce())->method('getDom');
132-
$object = new Loader($this->filesystem, $this->converter, $this->parser);
133-
$result = $object->load(['d']);
134+
$result = $this->loader->load(['d']);
134135
$this->assertSame(['a', 'c', 'b'], array_keys($result));
135136
$this->assertSame($fixture['a'], $result['a']);
136137
$this->assertSame($fixture['b'], $result['b']);

0 commit comments

Comments
 (0)