You are here

protected function XmlEncoderTest::getObject in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php \Symfony\Component\Serializer\Tests\Encoder\XmlEncoderTest::getObject()
2 calls to XmlEncoderTest::getObject()
XmlEncoderTest::testDecode in vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php
XmlEncoderTest::testEncode in vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php

File

vendor/symfony/serializer/Tests/Encoder/XmlEncoderTest.php, line 500

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;
}