17 $this->_model = new \Magento\Setup\Module\Di\Code\Scanner\CompositeScanner();
22 $phpFiles = [
'one/file/php',
'two/file/php'];
23 $configFiles = [
'one/file/config',
'two/file/config'];
24 $files = [
'php' => $phpFiles,
'config' => $configFiles];
26 $scannerPhp = $this->createMock(\
Magento\
Setup\
Module\Di\Code\Scanner\ScannerInterface::class);
27 $scannerXml = $this->createMock(\
Magento\
Setup\
Module\Di\Code\Scanner\ScannerInterface::class);
29 $scannerPhpExpected = [
'Model_OneProxy',
'Model_TwoFactory'];
30 $scannerXmlExpected = [
'Model_OneProxy',
'Model_ThreeFactory'];
38 $this->returnValue($scannerPhpExpected)
48 $this->returnValue($scannerXmlExpected)
51 $this->_model->addChild($scannerPhp,
'php');
52 $this->_model->addChild($scannerXml,
'config');
54 $actual = $this->_model->collectEntities(
$files);
55 $expected = [$scannerPhpExpected, $scannerXmlExpected];
57 $this->assertEquals($expected, array_values($actual));
foreach($appDirs as $dir) $files