|
7 | 7 |
|
8 | 8 | use Magento\Setup\Module\Di\Compiler\Log\Log;
|
9 | 9 |
|
| 10 | +/** |
| 11 | + * Test for Directory Decorator |
| 12 | + * @package Magento\Setup\Test\Unit\Module\Di\Code\Reader\InstancesNamesList |
| 13 | + */ |
10 | 14 | class DirectoryTest extends \PHPUnit\Framework\TestCase
|
11 | 15 | {
|
12 | 16 | /**
|
@@ -84,16 +88,26 @@ public function testGetList()
|
84 | 88 | ['NameSpace1\ClassName2', ['Parent_Class_Name', 'Interface_1', 'Interface_2']]
|
85 | 89 | ];
|
86 | 90 |
|
87 |
| - $this->classReaderMock->expects($this->exactly(count($classes))) |
| 91 | + $this->classReaderMock->expects( |
| 92 | + $this->exactly( |
| 93 | + count($classes) |
| 94 | + ) |
| 95 | + ) |
88 | 96 | ->method('getParents')
|
89 |
| - ->will($this->returnValueMap( |
90 |
| - $parents |
91 |
| - )); |
| 97 | + ->will( |
| 98 | + $this->returnValueMap( |
| 99 | + $parents |
| 100 | + ) |
| 101 | + ); |
92 | 102 |
|
93 | 103 | $this->logMock->expects($this->never())
|
94 | 104 | ->method('add');
|
95 | 105 |
|
96 |
| - $this->validatorMock->expects($this->exactly(count($classes))) |
| 106 | + $this->validatorMock->expects( |
| 107 | + $this->exactly( |
| 108 | + count($classes) |
| 109 | + ) |
| 110 | + ) |
97 | 111 | ->method('validate');
|
98 | 112 |
|
99 | 113 | $this->model->getList($path);
|
@@ -123,11 +137,17 @@ public function testGetListNoValidation()
|
123 | 137 | ['NameSpace1\ClassName2', ['Parent_Class_Name', 'Interface_1', 'Interface_2']]
|
124 | 138 | ];
|
125 | 139 |
|
126 |
| - $this->classReaderMock->expects($this->exactly(count($classes))) |
| 140 | + $this->classReaderMock->expects( |
| 141 | + $this->exactly( |
| 142 | + count($classes) |
| 143 | + ) |
| 144 | + ) |
127 | 145 | ->method('getParents')
|
128 |
| - ->will($this->returnValueMap( |
129 |
| - $parents |
130 |
| - )); |
| 146 | + ->will( |
| 147 | + $this->returnValueMap( |
| 148 | + $parents |
| 149 | + ) |
| 150 | + ); |
131 | 151 |
|
132 | 152 | $this->logMock->expects($this->never())
|
133 | 153 | ->method('add');
|
@@ -191,4 +211,12 @@ public function getListExceptionDataProvider()
|
191 | 211 | [new \ReflectionException('Not Valid!')]
|
192 | 212 | ];
|
193 | 213 | }
|
| 214 | + |
| 215 | + /** |
| 216 | + * @inheritdoc |
| 217 | + */ |
| 218 | + protected function tearDown() |
| 219 | + { |
| 220 | + restore_error_handler(); |
| 221 | + } |
194 | 222 | }
|
0 commit comments