File tree Expand file tree Collapse file tree
src/test/java/org/apache/xml/security/test/stax Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828import java .util .Set ;
2929
3030import javax .xml .namespace .NamespaceContext ;
31+ import javax .xml .parsers .DocumentBuilderFactory ;
3132import javax .xml .stream .XMLEventWriter ;
3233import javax .xml .stream .XMLOutputFactory ;
3334import javax .xml .stream .XMLStreamException ;
4647import org .junit .jupiter .api .BeforeEach ;
4748import org .junit .jupiter .api .Test ;
4849import org .xmlunit .matchers .CompareMatcher ;
50+ import org .xmlunit .util .DocumentBuilderFactoryConfigurer ;
4951
5052import static org .hamcrest .MatcherAssert .assertThat ;
5153import static org .junit .jupiter .api .Assertions .assertEquals ;
@@ -189,7 +191,11 @@ public Iterator<String> getPrefixes(String namespaceURI) {
189191 stdXmlStreamWriter .close ();
190192 }
191193
192- assertThat (stdStringWriter .toString (), CompareMatcher .isSimilarTo (securityStringWriter .toString ()));
194+ assertThat (stdStringWriter .toString (),
195+ CompareMatcher .isSimilarTo (securityStringWriter .toString ())
196+ .withDocumentBuilderFactory (
197+ DocumentBuilderFactoryConfigurer .DefaultWithDTDParsing .configure (
198+ DocumentBuilderFactory .newInstance ())));
193199 }
194200
195201 // @see https://issues.apache.org/jira/browse/SANTUARIO-433
You can’t perform that action at this time.
0 commit comments