File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -319,4 +319,47 @@ public function testResolveParameters(
319319 }
320320 }
321321
322+ public function testErrorFormatFromCli (): void
323+ {
324+ $ result = CommandHelper::begin (
325+ new StringInput ('' ),
326+ new NullOutput (),
327+ [__DIR__ ],
328+ null ,
329+ null ,
330+ [],
331+ null ,
332+ null ,
333+ '0 ' ,
334+ false ,
335+ false ,
336+ null ,
337+ null ,
338+ false ,
339+ 'json ' ,
340+ );
341+ $ this ->assertSame ('json ' , $ result ->getContainer ()->getParameter ('errorFormat ' ));
342+ }
343+
344+ public function testErrorFormatDefault (): void
345+ {
346+ $ result = CommandHelper::begin (
347+ new StringInput ('' ),
348+ new NullOutput (),
349+ [__DIR__ ],
350+ null ,
351+ null ,
352+ [],
353+ null ,
354+ null ,
355+ '0 ' ,
356+ false ,
357+ false ,
358+ null ,
359+ null ,
360+ false ,
361+ );
362+ $ this ->assertNull ($ result ->getContainer ()->getParameter ('errorFormat ' ));
363+ }
364+
322365}
You can’t perform that action at this time.
0 commit comments