public function ParserTest::getDataFormSpecifications in Loft Data Grids 6.2        
                          
                  
                        Same name and namespace in other branches
- 7.2 vendor/symfony/yaml/Tests/ParserTest.php \Symfony\Component\Yaml\Tests\ParserTest::getDataFormSpecifications()
File
 
   - vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParserTest.php, line 39
Class
  
  - ParserTest 
Namespace
  Symfony\Component\Yaml\Tests
Code
public function getDataFormSpecifications() {
  $parser = new Parser();
  $path = __DIR__ . '/Fixtures';
  $tests = array();
  $files = $parser
    ->parse(file_get_contents($path . '/index.yml'));
  foreach ($files as $file) {
    $yamls = file_get_contents($path . '/' . $file . '.yml');
    
    foreach (preg_split('/^---( %YAML\\:1\\.0)?/m', $yamls) as $yaml) {
      if (!$yaml) {
        continue;
      }
      $test = $parser
        ->parse($yaml);
      if (isset($test['todo']) && $test['todo']) {
        
      }
      else {
        eval('$expected = ' . trim($test['php']) . ';');
        $tests[] = array(
          $file,
          var_export($expected, true),
          $test['yaml'],
          $test['test'],
        );
      }
    }
  }
  return $tests;
}