elementMap['{urn:test}root'] = 'Sabre\Xml\Deserializer\enum'; $xml = << XML; $result = $service->parse($xml); $expected = [ '{urn:test}foo1', '{urn:test}foo2', ]; $this->assertEquals($expected, $result); } function testDeserializeDefaultNamespace() { $service = new Service(); $service->elementMap['{urn:test}root'] = function($reader) { return enum($reader, 'urn:test'); }; $xml = << XML; $result = $service->parse($xml); $expected = [ 'foo1', 'foo2', ]; $this->assertEquals($expected, $result); } }