Ejemplo n.º 1
0
 public function testAdd()
 {
     $application = new Application();
     $application->add($foo = new \FooCommand());
     $commands = $application->all();
     $this->assertEquals($foo, $commands['foo:bar'], '->add() registers a command');
     $application = new Application();
     $application->addCommands(array($foo = new \FooCommand(), $foo1 = new \Foo1Command()));
     $commands = $application->all();
     $this->assertEquals(array($foo, $foo1), array($commands['foo:bar'], $commands['foo:bar1']), '->addCommands() registers an array of commands');
 }