public function setUp() { parent::setUp(); $this->application = new Application(); $this->application->add(new \DaemonCommandStub($this->commandName)); $this->command = $this->application->find($this->commandName); $this->tester = new CommandTester($this->command); $this->command->setOutputCallback(function () { return $this->tester->getOutput(); }); }