Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\ExpressionLanguageExceptionFactory::createForCouldNotLexValue PHP Method

createForCouldNotLexValue() public static method

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));
    }

Usage Example

 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());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\ExpressionLanguageExceptionFactory::createForCouldNotLexValue