예제 #1
0
 /**
  * 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);
 }
예제 #2
0
 /**
  * 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']);
 }