Doctrine\Tests\OXM\Marshaller\MarshallerTest::itShouldSupportMarshallingToOtherEncodings PHP Method

itShouldSupportMarshallingToOtherEncodings() public method

    public function itShouldSupportMarshallingToOtherEncodings()
    {
        $simple = new SimpleChild();
        $this->marshaller->setEncoding('ISO-8859-1');
        $xml = $this->marshaller->marshalToString($simple);
        $this->assertTrue(strlen($xml) > 0);
        $this->assertXmlStringEqualsXmlString('<?xml version="1.0" encoding="ISO-8859-1"?><simple-child><other>yes</other></simple-child>', $xml);
        $obj = $this->marshaller->unmarshalFromString($xml);
        $this->assertEquals('yes', $obj->other);
    }