You are here

public function InlineTest::testDump in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Symfony/Component/Yaml/Tests/InlineTest.php \Symfony\Component\Yaml\Tests\InlineTest::testDump()
  2. 7.2 vendor/Symfony/Component/Yaml/Tests/InlineTest.php \Symfony\Component\Yaml\Tests\InlineTest::testDump()

File

vendor/Symfony/Component/Yaml/Tests/InlineTest.php, line 26

Class

InlineTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testDump() {
  $testsForDump = $this
    ->getTestsForDump();
  foreach ($testsForDump as $yaml => $value) {
    $this
      ->assertEquals($yaml, Inline::dump($value), sprintf('::dump() converts a PHP structure to an inline YAML (%s)', $yaml));
  }
  foreach ($this
    ->getTestsForParse() as $yaml => $value) {
    $this
      ->assertEquals($value, Inline::parse(Inline::dump($value)), 'check consistency');
  }
  foreach ($testsForDump as $yaml => $value) {
    $this
      ->assertEquals($value, Inline::parse(Inline::dump($value)), 'check consistency');
  }
}