public function ParserYamlTest::providerParse

8.0.x ParserYamlTest.php public ParserYamlTest::providerParse()
7.x ParserYamlTest.php public ParserYamlTest::providerParse()
master ParserYamlTest.php public ParserYamlTest::providerParse()

Provides YAML snippets to test the parser.

File

tests/Drush/Tests/Make/Parser/ParserYamlTest.php, line 34

Namespace

Drush\Tests\Make\Parser

Class

ParserYamlTest
@coversDefaultClass \Drush\Make\Parser\ParserYaml

Code

public function providerParse() {
  $yaml = <<<'YAML'
foo:
  bar:
    baz: one
YAML;
  $snippets[] = array($yaml, array('foo' => array('bar' => array('baz' => 'one'))));

  $yaml = <<<'YAML'
projects:
  drupal: ~
  views:
    version: '3.0'
YAML;

  $snippets[] = array($yaml, array('projects' => array(
    'drupal' => NULL,
    'views' => array('version' => '3.0'),
  )));

  // @todo make more tests.
  return $snippets;
}