public function itShouldDoInheritedFieldsCorrectly()
{
$request = new Request();
$request->id = 1;
$bo = new ConcreteBO1();
$bo->inherit = 1;
$bo->overridden = 'yes';
$request->bo = $bo;
$xml = $this->marshaller->marshalToString($request);
$this->assertXmlStringEqualsXmlString('<?xml version="1.0" encoding="UTF-8"?>
<request id="1">
<concrete-bo1 inherit="1">
<overridden>yes</overridden>
</concrete-bo1>
</request>', $xml);
$otherRequest = $this->marshaller->unmarshalFromString($xml);
$this->assertEquals(1, $otherRequest->id);
$this->assertInstanceOf('Doctrine\\Tests\\OXM\\Entities\\MappedSuperclass\\ConcreteBO1', $otherRequest->bo);
$this->assertInstanceOf('Doctrine\\Tests\\OXM\\Entities\\MappedSuperclass\\AbstractBusinessObject', $otherRequest->bo);
$this->assertEquals(1, $otherRequest->bo->inherit);
}