[TASK] Streamline phpdoc annotations in EXT:extbase
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / Tests / UnitDeprecated / Mvc / Cli / RequestBuilderTest.php
1 <?php
2 namespace TYPO3\CMS\Extbase\Tests\UnitDeprecated\Mvc\Cli;
3
4 /*
5 * This file is part of the TYPO3 CMS project.
6 *
7 * It is free software; you can redistribute it and/or modify it under
8 * the terms of the GNU General Public License, either version 2
9 * of the License, or any later version.
10 *
11 * For the full copyright and license information, please read the
12 * LICENSE.txt file that was distributed with this source code.
13 *
14 * The TYPO3 project - inspiring people to share!
15 */
16
17 use TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentMixingException;
18 use TYPO3\CMS\Extbase\Reflection\ClassSchema;
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20
21 /**
22 * Test case
23 */
24 class RequestBuilderTest extends UnitTestCase
25 {
26 /**
27 * @var \TYPO3\CMS\Extbase\Mvc\Cli\RequestBuilder|\TYPO3\TestingFramework\Core\AccessibleObjectInterface|\PHPUnit_Framework_Comparator_MockObject
28 */
29 protected $requestBuilder;
30
31 /**
32 * @var \TYPO3\CMS\Extbase\Mvc\Cli\Request|\PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
33 */
34 protected $request;
35
36 /**
37 * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
38 */
39 protected $mockObjectManager;
40
41 /**
42 * @var \TYPO3\CMS\Extbase\Mvc\Cli\Command
43 */
44 protected $mockCommand;
45
46 /**
47 * @var \TYPO3\CMS\Extbase\Mvc\Cli\CommandManager
48 */
49 protected $mockCommandManager;
50
51 /**
52 * @var \TYPO3\CMS\Extbase\Reflection\ReflectionService|\PHPUnit_Framework_MockObject_MockObject
53 */
54 protected $mockReflectionService;
55
56 /**
57 * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface|\PHPUnit_Framework_MockObject_MockObject
58 */
59 protected $mockConfigurationManager;
60
61 /**
62 * Sets up this test case
63 */
64 protected function setUp()
65 {
66 $this->request = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class, ['dummy']);
67 $this->mockObjectManager = $this->createMock(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface::class);
68 $this->mockObjectManager->expects($this->any())->method('get')->with(\TYPO3\CMS\Extbase\Mvc\Cli\Request::class)->will($this->returnValue($this->request));
69 $this->mockCommand = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Cli\Command::class);
70 $this->mockCommand->expects($this->any())->method('getControllerClassName')->will($this->returnValue('Tx\\SomeExtensionName\\Command\\DefaultCommandController'));
71 $this->mockCommand->expects($this->any())->method('getControllerCommandName')->will($this->returnValue('list'));
72 $this->mockCommandManager = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class);
73 $this->mockCommandManager->expects($this->any())->method('getCommandByIdentifier')->with('some_extension_name:default:list')->will($this->returnValue($this->mockCommand));
74 $this->mockReflectionService = $this->createMock(\TYPO3\CMS\Extbase\Reflection\ReflectionService::class);
75 $this->mockConfigurationManager = $this->createMock(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::class);
76 $this->requestBuilder = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Cli\RequestBuilder::class, ['dummy']);
77 $this->requestBuilder->_set('objectManager', $this->mockObjectManager);
78 $this->requestBuilder->_set('reflectionService', $this->mockReflectionService);
79 $this->requestBuilder->_set('commandManager', $this->mockCommandManager);
80 $this->requestBuilder->_set('configurationManager', $this->mockConfigurationManager);
81 }
82
83 /**
84 * Checks if a CLI request specifying a package, controller and action name results in the expected request object
85 *
86 * @test
87 */
88 public function cliAccessWithExtensionControllerAndActionNameBuildsCorrectRequest(): void
89 {
90 $classSchemaMock = $this->createMock(ClassSchema::class);
91 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
92 'params' => []
93 ]);
94
95 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
96 $request = $this->requestBuilder->build('some_extension_name:default:list');
97 $this->assertSame('Tx\\SomeExtensionName\\Command\\DefaultCommandController', $request->getControllerObjectName());
98 $this->assertSame('list', $request->getControllerCommandName(), 'The CLI request specifying a package, controller and action name did not return a request object pointing to the expected action.');
99 }
100
101 /**
102 * @test
103 */
104 public function ifCommandCantBeResolvedTheHelpScreenIsShown()
105 {
106 // The following call is only made to satisfy PHPUnit. For some weird reason PHPUnit complains that the
107 // mocked method ("getObjectNameByClassName") does not exist _if the mock object is not used_.
108 $this->mockCommandManager->getCommandByIdentifier('some_extension_name:default:list');
109 $mockCommandManager = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Cli\CommandManager::class);
110 $mockCommandManager
111 ->expects($this->any())
112 ->method('getCommandByIdentifier')
113 ->with('test:default:list')
114 ->will(
115 $this->throwException(
116 new \TYPO3\CMS\Extbase\Mvc\Exception\NoSuchCommandException('testing', 1476050312)
117 )
118 );
119 $this->requestBuilder->_set('commandManager', $mockCommandManager);
120 $request = $this->requestBuilder->build('test:default:list');
121 $this->assertSame(\TYPO3\CMS\Extbase\Command\HelpCommandController::class, $request->getControllerObjectName());
122 }
123
124 /**
125 * @test
126 */
127 public function argumentWithValueSeparatedByEqualSignBuildsCorrectRequest(): void
128 {
129 $methodParameters = [
130 'testArgument' => ['optional' => false, 'type' => 'string']
131 ];
132
133 $classSchemaMock = $this->createMock(ClassSchema::class);
134 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
135 'params' => $methodParameters
136 ]);
137
138 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
139 $request = $this->requestBuilder->build('some_extension_name:default:list --test-argument=value');
140 $this->assertTrue($request->hasArgument('testArgument'), 'The given "testArgument" was not found in the built request.');
141 $this->assertSame($request->getArgument('testArgument'), 'value', 'The "testArgument" had not the given value.');
142 }
143
144 /**
145 * Checks if a CLI request specifying some "console style" (--my-argument=value) arguments results in the expected request object
146 *
147 * @test
148 */
149 public function cliAccessWithExtensionControllerActionAndArgumentsBuildsCorrectRequest(): void
150 {
151 $methodParameters = [
152 'testArgument' => ['optional' => false, 'type' => 'string'],
153 'testArgument2' => ['optional' => false, 'type' => 'string']
154 ];
155
156 $classSchemaMock = $this->createMock(ClassSchema::class);
157 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
158 'params' => $methodParameters
159 ]);
160
161 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
162 $request = $this->requestBuilder->build('some_extension_name:default:list --test-argument=value --test-argument2=value2');
163 $this->assertTrue($request->hasArgument('testArgument'), 'The given "testArgument" was not found in the built request.');
164 $this->assertTrue($request->hasArgument('testArgument2'), 'The given "testArgument2" was not found in the built request.');
165 $this->assertEquals($request->getArgument('testArgument'), 'value', 'The "testArgument" had not the given value.');
166 $this->assertEquals($request->getArgument('testArgument2'), 'value2', 'The "testArgument2" had not the given value.');
167 }
168
169 /**
170 * Checks if a CLI request specifying some "console style" (--my-argument =value) arguments with spaces between name and value results in the expected request object
171 *
172 * @test
173 */
174 public function checkIfCLIAccesWithPackageControllerActionAndArgumentsToleratesSpaces(): void
175 {
176 $methodParameters = [
177 'testArgument' => ['optional' => false, 'type' => 'string'],
178 'testArgument2' => ['optional' => false, 'type' => 'string'],
179 'testArgument3' => ['optional' => false, 'type' => 'string'],
180 'testArgument4' => ['optional' => false, 'type' => 'string']
181 ];
182
183 $classSchemaMock = $this->createMock(ClassSchema::class);
184 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
185 'params' => $methodParameters
186 ]);
187
188 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
189 $request = $this->requestBuilder->build('some_extension_name:default:list --test-argument= value --test-argument2 =value2 --test-argument3 = value3 --test-argument4=value4');
190 $this->assertTrue($request->hasArgument('testArgument'), 'The given "testArgument" was not found in the built request.');
191 $this->assertTrue($request->hasArgument('testArgument2'), 'The given "testArgument2" was not found in the built request.');
192 $this->assertTrue($request->hasArgument('testArgument3'), 'The given "testArgument3" was not found in the built request.');
193 $this->assertTrue($request->hasArgument('testArgument4'), 'The given "testArgument4" was not found in the built request.');
194 $this->assertSame($request->getArgument('testArgument'), 'value', 'The "testArgument" had not the given value.');
195 $this->assertSame($request->getArgument('testArgument2'), 'value2', 'The "testArgument2" had not the given value.');
196 $this->assertSame($request->getArgument('testArgument3'), 'value3', 'The "testArgument3" had not the given value.');
197 $this->assertSame($request->getArgument('testArgument4'), 'value4', 'The "testArgument4" had not the given value.');
198 }
199
200 /**
201 * Checks if a CLI request specifying some short "console style" (-c value or -c=value or -c = value) arguments results in the expected request object
202 *
203 * @test
204 */
205 public function CLIAccesWithShortArgumentsBuildsCorrectRequest(): void
206 {
207 $methodParameters = [
208 'a' => ['optional' => false, 'type' => 'string'],
209 'd' => ['optional' => false, 'type' => 'string'],
210 'f' => ['optional' => false, 'type' => 'string']
211 ];
212
213 $classSchemaMock = $this->createMock(ClassSchema::class);
214 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
215 'params' => $methodParameters
216 ]);
217
218 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
219
220 $request = $this->requestBuilder->build('some_extension_name:default:list -d valued -f=valuef -a = valuea');
221 $this->assertTrue($request->hasArgument('d'), 'The given "d" was not found in the built request.');
222 $this->assertTrue($request->hasArgument('f'), 'The given "f" was not found in the built request.');
223 $this->assertTrue($request->hasArgument('a'), 'The given "a" was not found in the built request.');
224 $this->assertSame($request->getArgument('d'), 'valued', 'The "d" had not the given value.');
225 $this->assertSame($request->getArgument('f'), 'valuef', 'The "f" had not the given value.');
226 $this->assertSame($request->getArgument('a'), 'valuea', 'The "a" had not the given value.');
227 }
228
229 /**
230 * Checks if a CLI request specifying some mixed "console style" (-c or --my-argument -f=value) arguments with and
231 * without values results in the expected request object
232 *
233 * @test
234 */
235 public function CLIAccesWithArgumentsWithAndWithoutValuesBuildsCorrectRequest(): void
236 {
237 $methodParameters = [
238 'testArgument' => ['optional' => false, 'type' => 'string'],
239 'testArgument2' => ['optional' => false, 'type' => 'string'],
240 'testArgument3' => ['optional' => false, 'type' => 'string'],
241 'testArgument4' => ['optional' => false, 'type' => 'string'],
242 'testArgument5' => ['optional' => false, 'type' => 'string'],
243 'testArgument6' => ['optional' => false, 'type' => 'string'],
244 'testArgument7' => ['optional' => false, 'type' => 'string'],
245 'f' => ['optional' => false, 'type' => 'string'],
246 'd' => ['optional' => false, 'type' => 'string'],
247 'a' => ['optional' => false, 'type' => 'string'],
248 'c' => ['optional' => false, 'type' => 'string'],
249 'j' => ['optional' => false, 'type' => 'string'],
250 'k' => ['optional' => false, 'type' => 'string'],
251 'm' => ['optional' => false, 'type' => 'string']
252 ];
253
254 $classSchemaMock = $this->createMock(ClassSchema::class);
255 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
256 'params' => $methodParameters
257 ]);
258
259 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
260
261 $request = $this->requestBuilder->build('some_extension_name:default:list --test-argument=value --test-argument2= value2 -k --test-argument-3 = value3 --test-argument4=value4 -f valuef -d=valued -a = valuea -c --testArgument7 --test-argument5 = 5 --test-argument6 -j kjk -m');
262 $this->assertTrue($request->hasArgument('testArgument'), 'The given "testArgument" was not found in the built request.');
263 $this->assertTrue($request->hasArgument('testArgument2'), 'The given "testArgument2" was not found in the built request.');
264 $this->assertTrue($request->hasArgument('k'), 'The given "k" was not found in the built request.');
265 $this->assertTrue($request->hasArgument('testArgument3'), 'The given "testArgument3" was not found in the built request.');
266 $this->assertTrue($request->hasArgument('testArgument4'), 'The given "testArgument4" was not found in the built request.');
267 $this->assertTrue($request->hasArgument('f'), 'The given "f" was not found in the built request.');
268 $this->assertTrue($request->hasArgument('d'), 'The given "d" was not found in the built request.');
269 $this->assertTrue($request->hasArgument('a'), 'The given "a" was not found in the built request.');
270 $this->assertTrue($request->hasArgument('c'), 'The given "d" was not found in the built request.');
271 $this->assertTrue($request->hasArgument('testArgument7'), 'The given "testArgument7" was not found in the built request.');
272 $this->assertTrue($request->hasArgument('testArgument5'), 'The given "testArgument5" was not found in the built request.');
273 $this->assertTrue($request->hasArgument('testArgument6'), 'The given "testArgument6" was not found in the built request.');
274 $this->assertTrue($request->hasArgument('j'), 'The given "j" was not found in the built request.');
275 $this->assertTrue($request->hasArgument('m'), 'The given "m" was not found in the built request.');
276 $this->assertSame($request->getArgument('testArgument'), 'value', 'The "testArgument" had not the given value.');
277 $this->assertSame($request->getArgument('testArgument2'), 'value2', 'The "testArgument2" had not the given value.');
278 $this->assertSame($request->getArgument('testArgument3'), 'value3', 'The "testArgument3" had not the given value.');
279 $this->assertSame($request->getArgument('testArgument4'), 'value4', 'The "testArgument4" had not the given value.');
280 $this->assertSame($request->getArgument('f'), 'valuef', 'The "f" had not the given value.');
281 $this->assertSame($request->getArgument('d'), 'valued', 'The "d" had not the given value.');
282 $this->assertSame($request->getArgument('a'), 'valuea', 'The "a" had not the given value.');
283 $this->assertSame($request->getArgument('testArgument5'), '5', 'The "testArgument4" had not the given value.');
284 $this->assertSame($request->getArgument('j'), 'kjk', 'The "j" had not the given value.');
285 }
286
287 /**
288 * @test
289 */
290 public function insteadOfNamedArgumentsTheArgumentsCanBePassedUnnamedInTheCorrectOrder(): void
291 {
292 $methodParameters = [
293 'testArgument1' => ['optional' => false, 'type' => 'string'],
294 'testArgument2' => ['optional' => false, 'type' => 'string']
295 ];
296
297 $classSchemaMock = $this->createMock(ClassSchema::class);
298 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
299 'params' => $methodParameters
300 ]);
301
302 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
303 $request = $this->requestBuilder->build('some_extension_name:default:list --test-argument1 firstArgumentValue --test-argument2 secondArgumentValue');
304 $this->assertSame('firstArgumentValue', $request->getArgument('testArgument1'));
305 $this->assertSame('secondArgumentValue', $request->getArgument('testArgument2'));
306 $request = $this->requestBuilder->build('some_extension_name:default:list firstArgumentValue secondArgumentValue');
307 $this->assertSame('firstArgumentValue', $request->getArgument('testArgument1'));
308 $this->assertSame('secondArgumentValue', $request->getArgument('testArgument2'));
309 }
310
311 /**
312 * @test
313 */
314 public function argumentsAreDetectedAfterOptions(): void
315 {
316 $methodParameters = [
317 'some' => ['optional' => true, 'type' => 'boolean'],
318 'option' => ['optional' => true, 'type' => 'string'],
319 'argument1' => ['optional' => false, 'type' => 'string'],
320 'argument2' => ['optional' => false, 'type' => 'string']
321 ];
322
323 $classSchemaMock = $this->createMock(ClassSchema::class);
324 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
325 'params' => $methodParameters
326 ]);
327
328 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
329 $request = $this->requestBuilder->build('some_extension_name:default:list --some -option=value file1 file2');
330 $this->assertSame('list', $request->getControllerCommandName());
331 $this->assertTrue($request->getArgument('some'));
332 $this->assertSame('file1', $request->getArgument('argument1'));
333 $this->assertSame('file2', $request->getArgument('argument2'));
334 }
335
336 /**
337 * @test
338 */
339 public function exceedingArgumentsMayBeSpecified(): void
340 {
341 $methodParameters = [
342 'testArgument1' => ['optional' => false, 'type' => 'string'],
343 'testArgument2' => ['optional' => false, 'type' => 'string']
344 ];
345
346 $classSchemaMock = $this->createMock(ClassSchema::class);
347 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
348 'params' => $methodParameters
349 ]);
350
351 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
352
353 $expectedArguments = ['testArgument1' => 'firstArgumentValue', 'testArgument2' => 'secondArgumentValue'];
354 $request = $this->requestBuilder->build('some_extension_name:default:list --test-argument1=firstArgumentValue --test-argument2 secondArgumentValue exceedingArgument1');
355 $this->assertEquals($expectedArguments, $request->getArguments());
356 $this->assertEquals(['exceedingArgument1'], $request->getExceedingArguments());
357 }
358
359 /**
360 * @test
361 */
362 public function ifNamedArgumentsAreUsedAllRequiredArgumentsMustBeNamed(): void
363 {
364 $this->expectException(InvalidArgumentMixingException::class);
365 $this->expectExceptionCode(1309971820);
366 $methodParameters = [
367 'testArgument1' => ['optional' => false, 'type' => 'string'],
368 'testArgument2' => ['optional' => false, 'type' => 'string']
369 ];
370
371 $classSchemaMock = $this->createMock(ClassSchema::class);
372 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
373 'params' => $methodParameters
374 ]);
375
376 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
377
378 $this->requestBuilder->build('some_extension_name:default:list --test-argument1 firstArgumentValue secondArgumentValue');
379 }
380
381 /**
382 * @test
383 */
384 public function ifUnnamedArgumentsAreUsedAllRequiredArgumentsMustBeUnnamed(): void
385 {
386 $this->expectException(InvalidArgumentMixingException::class);
387 $this->expectExceptionCode(1309971821);
388 $methodParameters = [
389 'requiredArgument1' => ['optional' => false, 'type' => 'string'],
390 'requiredArgument2' => ['optional' => false, 'type' => 'string']
391 ];
392
393 $classSchemaMock = $this->createMock(ClassSchema::class);
394 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
395 'params' => $methodParameters
396 ]);
397
398 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
399
400 $this->requestBuilder->build('some_extension_name:default:list firstArgumentValue --required-argument2 secondArgumentValue');
401 }
402
403 /**
404 * @test
405 */
406 public function booleanOptionsAreConsideredEvenIfAnUnnamedArgumentFollows(): void
407 {
408 $methodParameters = [
409 'requiredArgument1' => ['optional' => false, 'type' => 'string'],
410 'requiredArgument2' => ['optional' => false, 'type' => 'string'],
411 'booleanOption' => ['optional' => true, 'type' => 'boolean']
412 ];
413
414 $classSchemaMock = $this->createMock(ClassSchema::class);
415 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
416 'params' => $methodParameters
417 ]);
418
419 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
420
421 $expectedArguments = ['requiredArgument1' => 'firstArgumentValue', 'requiredArgument2' => 'secondArgumentValue', 'booleanOption' => true];
422 $request = $this->requestBuilder->build('some_extension_name:default:list --booleanOption firstArgumentValue secondArgumentValue');
423 $this->assertEquals($expectedArguments, $request->getArguments());
424 }
425
426 /**
427 * @test
428 */
429 public function booleanOptionsCanHaveOnlyCertainValuesIfTheValueIsAssignedWithoutEqualSign(): void
430 {
431 $methodParameters = [
432 'b1' => ['optional' => true, 'type' => 'boolean'],
433 'b2' => ['optional' => true, 'type' => 'boolean'],
434 'b3' => ['optional' => true, 'type' => 'boolean'],
435 'b4' => ['optional' => true, 'type' => 'boolean'],
436 'b5' => ['optional' => true, 'type' => 'boolean'],
437 'b6' => ['optional' => true, 'type' => 'boolean']
438 ];
439
440 $classSchemaMock = $this->createMock(ClassSchema::class);
441 $classSchemaMock->expects($this->any())->method('getMethod')->with('listCommand')->willReturn([
442 'params' => $methodParameters
443 ]);
444
445 $this->mockReflectionService->expects($this->any())->method('getClassSchema')->with('Tx\\SomeExtensionName\\Command\\DefaultCommandController')->willReturn($classSchemaMock);
446
447 $expectedArguments = ['b1' => true, 'b2' => true, 'b3' => true, 'b4' => false, 'b5' => false, 'b6' => false];
448 $request = $this->requestBuilder->build('some_extension_name:default:list --b2 y --b1 1 --b3 true --b4 false --b5 n --b6 0');
449 $this->assertEquals($expectedArguments, $request->getArguments());
450 }
451 }