You are here

protected function InlineTest::getTestsForDump in Translation template extractor 7.3

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

File

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

Class

InlineTest

Namespace

Symfony\Component\Yaml\Tests

Code

protected function getTestsForDump() {
  return array(
    'null' => null,
    'false' => false,
    'true' => true,
    '12' => 12,
    "'quoted string'" => 'quoted string',
    '12.30e+02' => 1230.0,
    '1234' => 0x4d2,
    '1243' => 02333,
    '.Inf' => -log(0),
    '-.Inf' => log(0),
    "'686e444'" => '686e444',
    '.Inf' => \INF,
    '"foo\\r\\nbar"' => "foo\r\nbar",
    "'foo#bar'" => 'foo#bar',
    "'foo # bar'" => 'foo # bar',
    "'#cfcfcf'" => '#cfcfcf',
    "'a \"string\" with ''quoted strings inside'''" => 'a "string" with \'quoted strings inside\'',
    // sequences
    '[foo, bar, false, null, 12]' => array(
      'foo',
      'bar',
      false,
      null,
      12,
    ),
    '[\'foo,bar\', \'foo bar\']' => array(
      'foo,bar',
      'foo bar',
    ),
    // mappings
    '{ foo: bar, bar: foo, \'false\': false, \'null\': null, integer: 12 }' => array(
      'foo' => 'bar',
      'bar' => 'foo',
      'false' => false,
      'null' => null,
      'integer' => 12,
    ),
    '{ foo: bar, bar: \'foo: bar\' }' => array(
      'foo' => 'bar',
      'bar' => 'foo: bar',
    ),
    // nested sequences and mappings
    '[foo, [bar, foo]]' => array(
      'foo',
      array(
        'bar',
        'foo',
      ),
    ),
    '[foo, [bar, [foo, [bar, foo]], foo]]' => array(
      'foo',
      array(
        'bar',
        array(
          'foo',
          array(
            'bar',
            'foo',
          ),
        ),
        'foo',
      ),
    ),
    '{ foo: { bar: foo } }' => array(
      'foo' => array(
        'bar' => 'foo',
      ),
    ),
    '[foo, { bar: foo }]' => array(
      'foo',
      array(
        'bar' => 'foo',
      ),
    ),
    '[foo, { bar: foo, foo: [foo, { bar: foo }] }, [foo, { bar: foo }]]' => array(
      'foo',
      array(
        'bar' => 'foo',
        'foo' => array(
          'foo',
          array(
            'bar' => 'foo',
          ),
        ),
      ),
      array(
        'foo',
        array(
          'bar' => 'foo',
        ),
      ),
    ),
    '[foo, \'@foo.baz\', { \'%foo%\': \'foo is %foo%\', bar: \'%foo%\' }, true, \'@service_container\']' => array(
      'foo',
      '@foo.baz',
      array(
        '%foo%' => 'foo is %foo%',
        'bar' => '%foo%',
      ),
      true,
      '@service_container',
    ),
  );
}