You are here

public function ParserTest::testParserException in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/css-selector/Tests/Parser/ParserTest.php \Symfony\Component\CssSelector\Tests\Parser\ParserTest::testParserException()

@dataProvider getParserExceptionTestData

File

vendor/symfony/css-selector/Tests/Parser/ParserTest.php, line 33

Class

ParserTest

Namespace

Symfony\Component\CssSelector\Tests\Parser

Code

public function testParserException($source, $message) {
  $parser = new Parser();
  try {
    $parser
      ->parse($source);
    $this
      ->fail('Parser should throw a SyntaxErrorException.');
  } catch (SyntaxErrorException $e) {
    $this
      ->assertEquals($message, $e
      ->getMessage());
  }
}