Skip to content

Commit 666a3f6

Browse files
committed
Merge remote-tracking branch 'tango/MC-18745' into PR-08-2210
2 parents c5697d4 + c362130 commit 666a3f6

File tree

1 file changed

+37
-9
lines changed
  • setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/InstancesNamesList

1 file changed

+37
-9
lines changed

setup/src/Magento/Setup/Test/Unit/Module/Di/Code/Reader/InstancesNamesList/DirectoryTest.php

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
use Magento\Setup\Module\Di\Compiler\Log\Log;
99

10+
/**
11+
* Test for Directory Decorator
12+
* @package Magento\Setup\Test\Unit\Module\Di\Code\Reader\InstancesNamesList
13+
*/
1014
class DirectoryTest extends \PHPUnit\Framework\TestCase
1115
{
1216
/**
@@ -84,16 +88,26 @@ public function testGetList()
8488
['NameSpace1\ClassName2', ['Parent_Class_Name', 'Interface_1', 'Interface_2']]
8589
];
8690

87-
$this->classReaderMock->expects($this->exactly(count($classes)))
91+
$this->classReaderMock->expects(
92+
$this->exactly(
93+
count($classes)
94+
)
95+
)
8896
->method('getParents')
89-
->will($this->returnValueMap(
90-
$parents
91-
));
97+
->will(
98+
$this->returnValueMap(
99+
$parents
100+
)
101+
);
92102

93103
$this->logMock->expects($this->never())
94104
->method('add');
95105

96-
$this->validatorMock->expects($this->exactly(count($classes)))
106+
$this->validatorMock->expects(
107+
$this->exactly(
108+
count($classes)
109+
)
110+
)
97111
->method('validate');
98112

99113
$this->model->getList($path);
@@ -123,11 +137,17 @@ public function testGetListNoValidation()
123137
['NameSpace1\ClassName2', ['Parent_Class_Name', 'Interface_1', 'Interface_2']]
124138
];
125139

126-
$this->classReaderMock->expects($this->exactly(count($classes)))
140+
$this->classReaderMock->expects(
141+
$this->exactly(
142+
count($classes)
143+
)
144+
)
127145
->method('getParents')
128-
->will($this->returnValueMap(
129-
$parents
130-
));
146+
->will(
147+
$this->returnValueMap(
148+
$parents
149+
)
150+
);
131151

132152
$this->logMock->expects($this->never())
133153
->method('add');
@@ -191,4 +211,12 @@ public function getListExceptionDataProvider()
191211
[new \ReflectionException('Not Valid!')]
192212
];
193213
}
214+
215+
/**
216+
* @inheritdoc
217+
*/
218+
protected function tearDown()
219+
{
220+
restore_error_handler();
221+
}
194222
}

0 commit comments

Comments
 (0)