public function testThrowsAnErrorIfPassedParameterIsMalformed()
{
try {
$token = new Token('', new TokenType(TokenType::PARAMETER_TYPE));
$parser = new ParameterTokenParser();
$parser->parse($token);
$this->fail('Expected exception to be thrown.');
} catch (ParseException $exception) {
$this->assertEquals('Could not parse the token "" (type: PARAMETER_TYPE).', $exception->getMessage());
$this->assertEquals(0, $exception->getCode());
$this->assertNotNull($exception->getPrevious());
}
}