/** * Adds a command object. * * If a command with the same name already exists, it will be overridden. * * @param \Cilex\Command\Command $command A Command object * * @api * * @return void */ public function command(Command\Command $command) { $command->setContainer($this); $this['console']->add($command); }
/** * Tests whether the getService method correctly retrieves an element from * the container. */ public function testGetService() { $app = new \Cilex\Application('Test'); $this->fixture->setContainer($app); $this->assertInstanceOf('\\Symfony\\Component\\Console\\Application', $app['console']); }