Nelmio\Alice\Throwable\Exception\FixtureBuilder\ExpressionLanguage\ExpressionLanguageExceptionFactory::createForExpectedMethodCallOnlyIfHasAParser PHP Méthode

createForExpectedMethodCallOnlyIfHasAParser() public static méthode

public static createForExpectedMethodCallOnlyIfHasAParser ( string $method ) : ParserNotFoundException
$method string
Résultat 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));
    }

Usage Example

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