Cilex\Tests\ApplicationTest::testClosureCommand PHP Method

testClosureCommand() public method

public testClosureCommand ( )
    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);
    }