You are here

public function DumperTest::objectAsMapProvider in Lockr 7.3

File

vendor/symfony/yaml/Tests/DumperTest.php, line 325

Class

DumperTest

Namespace

Symfony\Component\Yaml\Tests

Code

public function objectAsMapProvider() {
  $tests = [];
  $bar = new \stdClass();
  $bar->class = 'classBar';
  $bar->args = [
    'bar',
  ];
  $zar = new \stdClass();
  $foo = new \stdClass();
  $foo->bar = $bar;
  $foo->zar = $zar;
  $object = new \stdClass();
  $object->foo = $foo;
  $tests['stdClass'] = [
    $object,
    $object,
  ];
  $arrayObject = new \ArrayObject();
  $arrayObject['foo'] = 'bar';
  $arrayObject['baz'] = 'foobar';
  $parsedArrayObject = new \stdClass();
  $parsedArrayObject->foo = 'bar';
  $parsedArrayObject->baz = 'foobar';
  $tests['ArrayObject'] = [
    $arrayObject,
    $parsedArrayObject,
  ];
  $a = new A();
  $tests['arbitrary-object'] = [
    $a,
    null,
  ];
  return $tests;
}