public function testClosureCommand()
{
$invoked = false;
$command = $this->app->command('closure-command', function () use(&$invoked) {
$invoked = true;
});
$this->assertInstanceOf('Symfony\\Component\\Console\\Command\\Command', $command);
$this->assertTrue($this->app['console']->has('closure-command'));
$command->run($this->getMock('Symfony\\Component\\Console\\Input\\InputInterface'), $this->getMock('Symfony\\Component\\Console\\Output\\OutputInterface'));
$this->assertTrue($invoked);
}