Doctrine\OXM\Marshaller\Marshaller::marshalToString PHP Method

marshalToString() public method

public marshalToString ( object $mappedObject ) : string
$mappedObject object
return string
    function marshalToString($mappedObject);

Usage Example

コード例 #1
0
 /**
  * @test
  * @dataProvider typeMappingProvider
  */
 public function itShouldProduceExactXmlForAttributeOfType($object, $resultString)
 {
     $xml = $this->marshaller->marshalToString($object);
     $this->assertTrue(strlen($xml) > 0);
     $this->assertXmlStringEqualsXmlString('<?xml version="1.0" encoding="UTF-8"?>' . $resultString, $xml);
     $otherObject = $this->marshaller->unmarshalFromString($xml);
     $this->assertEquals($object->i, $otherObject->i);
     $this->assertEquals($object, $otherObject);
 }
All Usage Examples Of Doctrine\OXM\Marshaller\Marshaller::marshalToString