'Name']; } public function getOptions(): array { return []; } public function execute(InputInterface $input, OutputInterface $output): int { $output->info('Hello ' . $input->getArgument('name')); return 0; } }; $adapter = new LaravelCommandAdapter($phredCommand); // Mock Laravel components $symfonyInput = new ArrayInput(['name' => 'John'], $adapter->getDefinition()); $symfonyOutput = new BufferedOutput(); // Use reflection to set protected properties as Laravel's constructor and run logic is complex $refl = new \ReflectionClass($adapter); $inputProp = $refl->getProperty('input'); $inputProp->setValue($adapter, $symfonyInput); $outputProp = $refl->getProperty('output'); $outputProp->setValue($adapter, $symfonyOutput); $exitCode = $adapter->handle(); $this->assertEquals(0, $exitCode); $this->assertStringContainsString('Hello John', $symfonyOutput->fetch()); } }