| @@ 811-820 (lines=10) @@ | ||
| 808 | )); |
|
| 809 | } |
|
| 810 | ||
| 811 | public function testYamlDirective() |
|
| 812 | { |
|
| 813 | $yaml = <<<'EOF' |
|
| 814 | %YAML 1.2 |
|
| 815 | --- |
|
| 816 | foo: 1 |
|
| 817 | bar: 2 |
|
| 818 | EOF; |
|
| 819 | $this->assertEquals(array('foo' => 1, 'bar' => 2), $this->parser->parse($yaml)); |
|
| 820 | } |
|
| 821 | ||
| 822 | public function testFloatKeys() |
|
| 823 | { |
|
| @@ 822-838 (lines=17) @@ | ||
| 819 | $this->assertEquals(array('foo' => 1, 'bar' => 2), $this->parser->parse($yaml)); |
|
| 820 | } |
|
| 821 | ||
| 822 | public function testFloatKeys() |
|
| 823 | { |
|
| 824 | $yaml = <<<'EOF' |
|
| 825 | foo: |
|
| 826 | 1.2: "bar" |
|
| 827 | 1.3: "baz" |
|
| 828 | EOF; |
|
| 829 | ||
| 830 | $expected = array( |
|
| 831 | 'foo' => array( |
|
| 832 | '1.2' => 'bar', |
|
| 833 | '1.3' => 'baz', |
|
| 834 | ), |
|
| 835 | ); |
|
| 836 | ||
| 837 | $this->assertEquals($expected, $this->parser->parse($yaml)); |
|
| 838 | } |
|
| 839 | ||
| 840 | /** |
|
| 841 | * @expectedException \Symfony\Component\Yaml\Exception\ParseException |
|