public function DumperTest::testEmptyArray in Lockr 7.3
File
- vendor/
symfony/ yaml/ Tests/ DumperTest.php, line 250
Class
Namespace
Symfony\Component\Yaml\TestsCode
public function testEmptyArray() {
$dump = $this->dumper
->dump([]);
$this
->assertEquals('{ }', $dump);
$dump = $this->dumper
->dump([], 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
$this
->assertEquals('[]', $dump);
$dump = $this->dumper
->dump([], 9, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE);
$this
->assertEquals('[]', $dump);
$dump = $this->dumper
->dump(new \ArrayObject(), 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE | Yaml::DUMP_OBJECT_AS_MAP);
$this
->assertEquals('{ }', $dump);
$dump = $this->dumper
->dump(new \stdClass(), 0, 0, Yaml::DUMP_EMPTY_ARRAY_AS_SEQUENCE | Yaml::DUMP_OBJECT_AS_MAP);
$this
->assertEquals('{ }', $dump);
}