function testSerializeWithRootNodeMappingShouldThrowError() { $a = new Hypercharge\Address($this->address()); $this->expectException(new PatternExpectation('/class "Address" has no root-name mapping/')); $serializer = new Hypercharge\XmlSerializer(); $serializer->toXml($a); }