Stecman\Component\Symfony\Console\BashCompletion\Tests\CompletionContextTest::testWordBreakSplit PHP Method

testWordBreakSplit() public method

public testWordBreakSplit ( )
    public function testWordBreakSplit()
    {
        $context = new CompletionContext();
        $context->setCommandLine('console  config:application --direction="west" --with-bruce --repeat 3');
        // Cursor at the end of the first word
        $context->setCharIndex(7);
        $words = $context->getWords();
        $this->assertEquals(array('console', 'config:application', '--direction', 'west', '--with-bruce', '--repeat', '3'), $words);
    }