@@ -129,12 +129,10 @@ public function executeWillReturnSuccessWhenProcessQueueSucceeds(): void
129129 $ this ->logger ->log (
130130 'info ' ,
131131 'Code style checks completed successfully. ' ,
132- [
133- 'input ' => $ this ->input ->reveal (),
134- 'fix ' => false ,
135- 'config ' => CodeStyleCommand::CONFIG ,
136- 'process_output ' => null ,
137- ],
132+ Argument::that (fn (array $ context ): bool => $ this ->input ->reveal () === $ context ['input ' ]
133+ && false === $ context ['fix ' ]
134+ && CodeStyleCommand::CONFIG === $ context ['config ' ]
135+ && $ context ['output ' ] instanceof OutputInterface),
138136 )->shouldBeCalled ();
139137
140138 self ::assertSame (CodeStyleCommand::SUCCESS , $ this ->executeCommand ());
@@ -155,14 +153,12 @@ public function executeWillReturnFailureWhenProcessQueueFails(): void
155153 ->shouldBeCalled ();
156154 $ this ->logger ->error (
157155 'Code style checks failed. ' ,
158- [
159- 'input ' => $ this ->input ->reveal (),
160- 'file ' => null ,
161- 'line ' => null ,
162- 'fix ' => false ,
163- 'config ' => CodeStyleCommand::CONFIG ,
164- 'process_output ' => null ,
165- ],
156+ Argument::that (fn (array $ context ): bool => $ this ->input ->reveal () === $ context ['input ' ]
157+ && null === $ context ['file ' ]
158+ && null === $ context ['line ' ]
159+ && false === $ context ['fix ' ]
160+ && CodeStyleCommand::CONFIG === $ context ['config ' ]
161+ && $ context ['output ' ] instanceof OutputInterface),
166162 )->shouldBeCalled ();
167163
168164 self ::assertSame (CodeStyleCommand::FAILURE , $ this ->executeCommand ());
@@ -190,7 +186,7 @@ public function executeWillCaptureBufferedOutputWhenJsonIsRequested(): void
190186 'info ' ,
191187 'Code style checks completed successfully. ' ,
192188 Argument::that (fn (array $ context ): bool => $ this ->input ->reveal () === $ context ['input ' ]
193- && \is_string ( $ context ['process_output ' ]) ),
189+ && $ context ['output ' ] instanceof OutputInterface ),
194190 )->shouldBeCalled ();
195191
196192 self ::assertSame (CodeStyleCommand::SUCCESS , $ this ->executeCommand ());
0 commit comments