public function DocParserTest::testTrailingCommaIsAllowed

File

drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Annotations/DocParserTest.php, line 1106

Class

DocParserTest

Namespace

Doctrine\Tests\Common\Annotations

Code

public function testTrailingCommaIsAllowed() {
  $parser = $this
    ->createTestParser();
  $annots = $parser
    ->parse('@Name({
            "Foo",
            "Bar",
        })');
  $this
    ->assertEquals(1, count($annots));
  $this
    ->assertEquals(array(
    'Foo',
    'Bar',
  ), $annots[0]->value);
}