publicfunctiontestGetHelperWithoutHelperSet() { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Cannot retrieve helper "formatter" because there is no HelperSet defined.'); $command = new \TestCommand(); $command->getHelper('formatter'); }
$r = new \ReflectionObject($command); $m = $r->getMethod('mergeApplicationDefinition'); $m->invoke($command); $this->assertTrue($command->getDefinition()->hasArgument('foo'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); $this->assertTrue($command->getDefinition()->hasArgument('bar'), '->mergeApplicationDefinition() merges the application arguments and the command arguments'); $this->assertTrue($command->getDefinition()->hasOption('foo'), '->mergeApplicationDefinition() merges the application options and the command options');