protected function XmlEncoderTest::getObject

2 calls to XmlEncoderTest::getObject()
XmlEncoderTest::testDecode in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php
XmlEncoderTest::testEncode in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php, line 286

Class

XmlEncoderTest

Namespace

Symfony\Component\Serializer\Tests\Encoder

Code

protected function getObject() {
  $obj = new Dummy();
  $obj->foo = 'foo';
  $obj->bar = array(
    'a',
    'b',
  );
  $obj->baz = array(
    'key' => 'val',
    'key2' => 'val',
    'A B' => 'bar',
    'item' => array(
      array(
        'title' => 'title1',
      ),
      array(
        'title' => 'title2',
      ),
    ),
    'Barry' => array(
      'FooBar' => array(
        'Baz' => 'Ed',
        '@id' => 1,
      ),
    ),
  );
  $obj->qux = "1";
  return $obj;
}