mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-26 20:14:46 +01:00
Very that node type is valid in XML unserializer
This commit is contained in:
parent
d9bd550414
commit
fd064dac6c
@ -141,6 +141,9 @@ class XML implements Unserializer
|
||||
if (!class_exists($className)) {
|
||||
$className .= '_';
|
||||
}
|
||||
if (!class_exists($className)) {
|
||||
throw new DomainException(sprintf('Unknown node type "%s"', $type));
|
||||
}
|
||||
return $className;
|
||||
}
|
||||
}
|
||||
|
@ -141,6 +141,10 @@ XML;
|
||||
'<node:Scalar_String><subNode:value/></node:Scalar_String>',
|
||||
'Expected node or scalar'
|
||||
),
|
||||
array(
|
||||
'<node:Foo><subNode:value/></node:Foo>',
|
||||
'Unknown node type "Foo"'
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user