You are here

public function InlineTest::testParseUnquotedScalarStartingWithReservedIndicator in Lockr 7.3

@dataProvider getReservedIndicators

File

vendor/symfony/yaml/Tests/InlineTest.php, line 305

Class

InlineTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testParseUnquotedScalarStartingWithReservedIndicator($indicator) {
  if (method_exists($this, 'expectExceptionMessage')) {
    $this
      ->expectException(ParseException::class);
    $this
      ->expectExceptionMessage(sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
  }
  else {
    $this
      ->setExpectedException(ParseException::class, sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
  }
  Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
}