$this->assertEquals('TestBundle\FooBundle\Controller\DefaultController::indexAction',$parser->parse('FooBundle:Default:index'),'->parse() converts a short a:b:c notation string to a class::method string');
$this->assertEquals('TestBundle\FooBundle\Controller\Sub\DefaultController::indexAction',$parser->parse('FooBundle:Sub\Default:index'),'->parse() converts a short a:b:c notation string to a class::method string');
$this->assertEquals('TestBundle\Fabpot\FooBundle\Controller\DefaultController::indexAction',$parser->parse('SensioFooBundle:Default:index'),'->parse() converts a short a:b:c notation string to a class::method string');
$this->assertEquals('TestBundle\Sensio\Cms\FooBundle\Controller\DefaultController::indexAction',$parser->parse('SensioCmsFooBundle:Default:index'),'->parse() converts a short a:b:c notation string to a class::method string');
try{
$parser->parse('foo:');
$this->fail('->parse() throws an \InvalidArgumentException if the controller is not an a:b:c string');
}catch(\Exception$e){
$this->assertInstanceOf('\InvalidArgumentException',$e,'->parse() throws an \InvalidArgumentException if the controller is not an a:b:c string');
}
try{
$parser->parse('BarBundle:Default:index');
$this->fail('->parse() throws a \InvalidArgumentException if the class is found but does not exist');
}catch(\Exception$e){
$this->assertInstanceOf('\InvalidArgumentException',$e,'->parse() throws a \LogicException if the class is found but does not exist');