You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
I have the same problem; I have some data which is common to several different tests, and when I want to change it I need to go modify it in several different places.
It seems to me that this would be easily by supporting external html entities; this requires only one change to the simplexml_load_file call, adding the LIBXML_NOENT argument.
We can then do things like
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE dataset [
<!ENTITY someFileOne SYSTEM "./someFileOne.xml">
<!ENTITY someFileTwo SYSTEM "./someFileTwo.xml">
]>
<dataset>
&someFileOne;
&someFileTwo;
</dataset>
I have changed the simplexml_load_file call from
$this->xmlFileContents = @simplexml_load_file($xmlFile);
to
$this->xmlFileContents = @simplexml_load_file($xmlFile, null, LIBXML_NOENT);
and it seems to work fine (although my testing is very limited so far).
I'm not familiar with git, so I'm not sure how to provide it, but I have created a patch which adds an option to process the entities when creating the datasets; the change is trivial. If anyone can explain how I can attach a patch (or what other process I should follow) I'll provide the patch.
Copied from http://www.phpunit.de/ticket/724
The text was updated successfully, but these errors were encountered: