You are here

public function InlineTest::getDataForParseReferences in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/yaml/Tests/InlineTest.php \Symfony\Component\Yaml\Tests\InlineTest::getDataForParseReferences()

File

vendor/symfony/yaml/Tests/InlineTest.php, line 134

Class

InlineTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function getDataForParseReferences() {
  return array(
    'scalar' => array(
      '*var',
      'var-value',
    ),
    'list' => array(
      '[ *var ]',
      array(
        'var-value',
      ),
    ),
    'list-in-list' => array(
      '[[ *var ]]',
      array(
        array(
          'var-value',
        ),
      ),
    ),
    'map-in-list' => array(
      '[ { key: *var } ]',
      array(
        array(
          'key' => 'var-value',
        ),
      ),
    ),
    'embedded-mapping-in-list' => array(
      '[ key: *var ]',
      array(
        array(
          'key' => 'var-value',
        ),
      ),
    ),
    'map' => array(
      '{ key: *var }',
      array(
        'key' => 'var-value',
      ),
    ),
    'list-in-map' => array(
      '{ key: [*var] }',
      array(
        'key' => array(
          'var-value',
        ),
      ),
    ),
    'map-in-map' => array(
      '{ foo: { bar: *var } }',
      array(
        'foo' => array(
          'bar' => 'var-value',
        ),
      ),
    ),
  );
}