OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
symfony
/
yaml
/
Tests
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:21 AM
rwxr-xr-x
📁
Command
-
08/07/2024 04:34:21 AM
rwxr-xr-x
📄
DumperTest.php
30.3 KB
08/07/2024 04:34:00 AM
rw-r--r--
📁
Fixtures
-
08/07/2024 04:34:22 AM
rwxr-xr-x
📄
InlineTest.php
42.68 KB
08/07/2024 04:34:01 AM
rw-r--r--
📄
ParseExceptionTest.php
1.04 KB
08/07/2024 04:34:01 AM
rw-r--r--
📄
ParserTest.php
70.18 KB
08/07/2024 04:34:01 AM
rw-r--r--
📄
YamlTest.php
1.19 KB
08/07/2024 04:34:01 AM
rw-r--r--
Editing: YamlTest.php
Close
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Yaml\Tests; use PHPUnit\Framework\TestCase; use Symfony\Component\Yaml\Yaml; class YamlTest extends TestCase { public function testParseAndDump() { $data = ['lorem' => 'ipsum', 'dolor' => 'sit']; $yml = Yaml::dump($data); $parsed = Yaml::parse($yml); $this->assertEquals($data, $parsed); } public function testZeroIndentationThrowsException() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('The indentation must be greater than zero'); Yaml::dump(['lorem' => 'ipsum', 'dolor' => 'sit'], 2, 0); } public function testNegativeIndentationThrowsException() { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('The indentation must be greater than zero'); Yaml::dump(['lorem' => 'ipsum', 'dolor' => 'sit'], 2, -4); } }