You are here

public function DumperTest::testObjectSupportEnabled in Service Container 7

Same name and namespace in other branches
  1. 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Tests/DumperTest.php \Symfony\Component\Yaml\Tests\DumperTest::testObjectSupportEnabled()

File

modules/providers/service_container_symfony/lib/Symfony/Component/Yaml/Tests/DumperTest.php, line 179

Class

DumperTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function testObjectSupportEnabled() {
  $dump = $this->dumper
    ->dump(array(
    'foo' => new A(),
    'bar' => 1,
  ), 0, 0, false, true);
  $this
    ->assertEquals('{ foo: !!php/object:O:30:"Symfony\\Component\\Yaml\\Tests\\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects');
}