public static createForExpectedMethodCallOnlyIfHasAParser ( string $method ) : ParserNotFoundException | ||
$method | string | |
return | ParserNotFoundException |
public static function createForExpectedMethodCallOnlyIfHasAParser(string $method) : ParserNotFoundException
{
return new ParserNotFoundException(sprintf('Expected method "%s" to be called only if it has a parser.', $method));
}
public function testTestCreateForExpectedMethodCallOnlyIfHasAParser() { $exception = ExpressionLanguageExceptionFactory::createForExpectedMethodCallOnlyIfHasAParser('foo'); $this->assertEquals('Expected method "foo" to be called only if it has a parser.', $exception->getMessage()); $this->assertEquals(0, $exception->getCode()); $this->assertNull($exception->getPrevious()); }