public static createForCouldNotLexValue ( string $value ) : LexException | ||
$value | string | |
return | LexException |
public static function createForCouldNotLexValue(string $value) : LexException
{
return new LexException(sprintf('Could not lex the value "%s".', $value));
}
public function testTestCreateForCouldNotLexValue() { $exception = ExpressionLanguageExceptionFactory::createForCouldNotLexValue('foo'); $this->assertEquals('Could not lex the value "foo".', $exception->getMessage()); $this->assertEquals(0, $exception->getCode()); $this->assertNull($exception->getPrevious()); }