function TestFileParserTest::testParseContents

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php \Drupal\Tests\Core\Test\RunTests\TestFileParserTest::testParseContents()
  2. 10 core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php \Drupal\Tests\Core\Test\RunTests\TestFileParserTest::testParseContents()
  3. 9 core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php \Drupal\Tests\Core\Test\RunTests\TestFileParserTest::testParseContents()
  4. 8.9.x core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php \Drupal\Tests\Core\Test\RunTests\TestFileParserTest::testParseContents()

Tests parse contents.

Attributes

#[DataProvider('provideTestFileContents')]

File

core/tests/Drupal/Tests/Core/Test/RunTests/TestFileParserTest.php, line 77

Class

TestFileParserTest
Tests for the deprecated TestFileParser class.

Namespace

Drupal\Tests\Core\Test\RunTests

Code

public function testParseContents($expected, $contents) : void {
  $parser = new TestFileParser();
  $ref_parse = new \ReflectionMethod($parser, 'parseContents');
  $this->assertSame($expected, $ref_parse->invoke($parser, $contents));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.