/** * Application constructor. * @param KernelInterface $kernel * @throws \Symfony\Component\Console\Exception\LogicException * @throws \Symfony\Component\Console\Exception\InvalidArgumentException */ public function __construct(KernelInterface $kernel) { $this->kernel = $kernel; parent::__construct($kernel->getName() . ' cli application'); //todo: move to ./bin/console $this->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', $kernel->getEnvironment())); }
/** * @param KernelInterface $kernel * @depends testConfigInstanceOfConfig */ public function testEnvironmentName(KernelInterface $kernel) { $this->assertEquals($this->env, $kernel->getEnvironment()); }