| @@ 899-908 (lines=10) @@ | ||
| 896 | )); |
|
| 897 | } |
|
| 898 | ||
| 899 | public function testYamlDirective() |
|
| 900 | { |
|
| 901 | $yaml = <<<'EOF' |
|
| 902 | %YAML 1.2 |
|
| 903 | --- |
|
| 904 | foo: 1 |
|
| 905 | bar: 2 |
|
| 906 | EOF; |
|
| 907 | $this->assertEquals(array('foo' => 1, 'bar' => 2), $this->parser->parse($yaml)); |
|
| 908 | } |
|
| 909 | ||
| 910 | public function testFloatKeys() |
|
| 911 | { |
|
| @@ 910-926 (lines=17) @@ | ||
| 907 | $this->assertEquals(array('foo' => 1, 'bar' => 2), $this->parser->parse($yaml)); |
|
| 908 | } |
|
| 909 | ||
| 910 | public function testFloatKeys() |
|
| 911 | { |
|
| 912 | $yaml = <<<'EOF' |
|
| 913 | foo: |
|
| 914 | 1.2: "bar" |
|
| 915 | 1.3: "baz" |
|
| 916 | EOF; |
|
| 917 | ||
| 918 | $expected = array( |
|
| 919 | 'foo' => array( |
|
| 920 | '1.2' => 'bar', |
|
| 921 | '1.3' => 'baz', |
|
| 922 | ), |
|
| 923 | ); |
|
| 924 | ||
| 925 | $this->assertEquals($expected, $this->parser->parse($yaml)); |
|
| 926 | } |
|
| 927 | ||
| 928 | /** |
|
| 929 | * @group legacy |
|