|
1 | 1 | <?php
|
2 | 2 | /**
|
3 |
| - * Copyright 2025 Adobe |
| 3 | + * Copyright 2015 Adobe |
4 | 4 | * All Rights Reserved.
|
5 | 5 | */
|
6 | 6 | declare(strict_types=1);
|
@@ -188,25 +188,21 @@ public function testExecute()
|
188 | 188 | ->with(ProgressBar::class)
|
189 | 189 | ->willReturn($progressBar);
|
190 | 190 |
|
| 191 | + $operations = [ |
| 192 | + OperationFactory::REPOSITORY_GENERATOR, |
| 193 | + OperationFactory::DATA_ATTRIBUTES_GENERATOR, |
| 194 | + OperationFactory::APPLICATION_CODE_GENERATOR, |
| 195 | + OperationFactory::INTERCEPTION, |
| 196 | + OperationFactory::AREA_CONFIG_GENERATOR, |
| 197 | + OperationFactory::INTERCEPTION_CACHE, |
| 198 | + OperationFactory::APPLICATION_ACTION_LIST_GENERATOR, |
| 199 | + OperationFactory::PLUGIN_LIST_GENERATOR, |
| 200 | + ]; |
191 | 201 | $this->managerMock->expects($this->exactly(9))->method('addOperation')
|
192 |
| - ->willReturnCallback(function ($arg1, $arg2) { |
| 202 | + ->willReturnCallback(function ($arg1, $arg2) use ($operations) { |
193 | 203 | if ($arg1 == OperationFactory::PROXY_GENERATOR && empty($arg2)) {
|
194 | 204 | return null;
|
195 |
| - } elseif ($arg1 == OperationFactory::REPOSITORY_GENERATOR) { |
196 |
| - return null; |
197 |
| - } elseif ($arg1 == OperationFactory::DATA_ATTRIBUTES_GENERATOR) { |
198 |
| - return null; |
199 |
| - } elseif ($arg1 == OperationFactory::APPLICATION_CODE_GENERATOR) { |
200 |
| - return null; |
201 |
| - } elseif ($arg1 == OperationFactory::INTERCEPTION) { |
202 |
| - return null; |
203 |
| - } elseif ($arg1 == OperationFactory::AREA_CONFIG_GENERATOR) { |
204 |
| - return null; |
205 |
| - } elseif ($arg1 == OperationFactory::INTERCEPTION_CACHE) { |
206 |
| - return null; |
207 |
| - } elseif ($arg1 == OperationFactory::APPLICATION_ACTION_LIST_GENERATOR) { |
208 |
| - return null; |
209 |
| - } elseif ($arg1 == OperationFactory::PLUGIN_LIST_GENERATOR) { |
| 205 | + } elseif (in_array($arg1, $operations)) { |
210 | 206 | return null;
|
211 | 207 | }
|
212 | 208 | });
|
|
0 commit comments