ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
YamlTest.php
Go to the documentation of this file.
1
<?
php
2
3
/*
4
* This file is part of the Symfony package.
5
*
6
* (c) Fabien Potencier <fabien@symfony.com>
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace
Symfony\Component\Yaml\Tests
;
13
14
use
Symfony\Component\Yaml\Yaml
;
15
16
class
YamlTest
extends
\PHPUnit_Framework_TestCase
17
{
18
public
function
testParseAndDump
()
19
{
20
$data
= array(
'lorem'
=>
'ipsum'
,
'dolor'
=>
'sit'
);
21
$yml =
Yaml::dump
(
$data
);
22
$parsed =
Yaml::parse
($yml);
23
$this->assertEquals(
$data
, $parsed);
24
}
25
30
public
function
testZeroIndentationThrowsException
()
31
{
32
Yaml::dump
(array(
'lorem'
=>
'ipsum'
,
'dolor'
=>
'sit'
), 2, 0);
33
}
34
39
public
function
testNegativeIndentationThrowsException
()
40
{
41
Yaml::dump
(array(
'lorem'
=>
'ipsum'
,
'dolor'
=>
'sit'
), 2, -4);
42
}
43
}
Symfony\Component\Yaml\Yaml\dump
static dump($input, $inline=2, $indent=4, $flags=0)
Dumps a PHP value to a YAML string.
Definition:
Yaml.php:94
Yaml
Symfony\Component\Yaml\Tests
Definition:
DumperTest.php:12
Symfony\Component\Yaml\Tests\YamlTest\testNegativeIndentationThrowsException
testNegativeIndentationThrowsException()
The indentation must be greater than zero
Definition:
YamlTest.php:39
PHPUnit_Framework_TestCase
Symfony\Component\Yaml\Tests\YamlTest\testParseAndDump
testParseAndDump()
Definition:
YamlTest.php:18
Symfony\Component\Yaml\Yaml\parse
static parse($input, $flags=0)
Parses YAML into a PHP value.
Definition:
Yaml.php:48
Symfony\Component\Yaml\Tests\YamlTest
Definition:
YamlTest.php:16
php
Symfony\Component\Yaml\Tests\YamlTest\testZeroIndentationThrowsException
testZeroIndentationThrowsException()
The indentation must be greater than zero
Definition:
YamlTest.php:30
$data
$data
Definition:
bench.php:6
libs
composer
vendor
symfony
yaml
Tests
YamlTest.php
Generated on Thu Jan 16 2025 19:01:56 for ILIAS by
1.8.13 (using
Doxyfile
)