Since: 2.0
Author: Richard Fullmer (richard.fullmer@opensoftdev.com)
コード例 #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);
 }
コード例 #2
0
 public function load($id)
 {
     $xml = $this->storage->load($this->metadata, $id);
     return $this->marshaller->unmarshalFromString($xml);
 }