public static createForMalformedFunction ( string $value ) : MalformedFunctionException | ||
$value | string | |
return | MalformedFunctionException |
public static function createForMalformedFunction(string $value) : MalformedFunctionException
{
return new MalformedFunctionException(sprintf('The value "%s" contains an unclosed function.', $value));
}
public function testTestCreateForMalformedFunction() { $exception = ExpressionLanguageExceptionFactory::createForMalformedFunction('foo'); $this->assertEquals('The value "foo" contains an unclosed function.', $exception->getMessage()); $this->assertEquals(0, $exception->getCode()); $this->assertNull($exception->getPrevious()); }