Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidExpressionLanguageToken PHP Method

createForInvalidExpressionLanguageToken() public static method

public static createForInvalidExpressionLanguageToken ( string $value ) : InvalidArgumentException
$value string
return InvalidArgumentException
    public static function createForInvalidExpressionLanguageToken(string $value) : \InvalidArgumentException
    {
        return new \InvalidArgumentException(sprintf('Invalid token "%s" found.', $value));
    }

Usage Example

 public function testTestCreateForInvalidExpressionLanguageToken()
 {
     $exception = InvalidArgumentExceptionFactory::createForInvalidExpressionLanguageToken('foo');
     $this->assertEquals('Invalid token "foo" found.', $exception->getMessage());
     $this->assertEquals(0, $exception->getCode());
     $this->assertNull($exception->getPrevious());
 }
All Usage Examples Of Nelmio\Alice\Throwable\Exception\InvalidArgumentExceptionFactory::createForInvalidExpressionLanguageToken