/**
  * @expectedException MattyG\Handlebars\Argument\Exception
  * @expectedExceptionMessage Non-whitespace character detected after string argument:
  */
 public function testTokeniseException1()
 {
     $argParser = $this->argumentParserFactory->create('abcdef "rofl"copter a1');
     $argParser->tokenise();
 }
Example #2
0
 /**
  * Handlebars will give arguments in a string. This will transform them
  * into a legitimate argument array.
  *
  * @param string $string The argument string.
  * @return ArgumentList
  * @throws Exception
  */
 protected function parseArguments(string $string) : ArgumentList
 {
     $argParser = $this->argumentParserFactory->create($string);
     return $argParser->tokenise();
 }