File: SpycTest.php

package info (click to toggle)
php-spyc 0.6.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: php: 2,088; xml: 8; makefile: 5
file content (23 lines) | stat: -rw-r--r-- 450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

declare(strict_types = 1);

use \PHPUnit\Framework\TestCase;

class SpycTest extends TestCase
{
    public function testDumpLoad(): void
    {
        $data = [
            'foo' => 'bar',
            'bar' => [
                'option1',
                'option2'
            ]
        ];

        $yaml = Spyc::YAMLDump($data, 4, 60);
        $loadedData = Spyc::YAMLLoadString($yaml);
        $this->assertSame($data, $loadedData);
    }
}