title: Can I use phpunit.xml for credentials and phpunit.xml.dist for testsuites?
body: <p>What I wanted to do was have credentials in the phpunit.xml and the test suites in phpunit.xml.dist.  The problem with this setup seems to be that anytime a test is added every developer needs to add it to their own personal phpunit.xml.  To get around this, my idea was to have the test suites come from the .dist version.  Despite trying a lot of different versions, I'm not sure what I am missing.  Here is what I am trying to do</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;phpunit
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.5/phpunit.xsd"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      bootstrap="cfg/phpunit_autoload.php"&gt;
  &lt;php&gt;
      &lt;var name="DB_DSN" value="mysql:dbname=mysql;host=localhost;port=3306"/&gt;
      &lt;var name="DB_USER" value="root"/&gt;
      &lt;var name="DB_PASS" value="your_local_pass"/&gt;
      &lt;var name="DB_DEFAULTDB" value="mysql"/&gt;        
  &lt;/php&gt;
  &lt;xi:include href="tests/phpunit.xml.dist" parse="xml" xpointer="test-suites"&gt;
      &lt;xi:fallback&gt;
          &lt;testsuites id="test-suites"&gt;
              &lt;testsuite name="MTD"&gt;
                  &lt;directory&gt;tests/app/MTD&lt;/directory&gt;
              &lt;/testsuite&gt;
          &lt;/testsuites&gt;
      &lt;/xi:fallback&gt;
  &lt;/xi:include&gt;
  </code></pre>
  
  <p></p>
  
  <p>The idea is that when someone was getting started for the first time they would copy the .dist file from /tests into root as .xml and replace with their credentials.  So instead of the normal setup where .dist and .xml live in the same folder I would have the .xml file at project root and .dist in /tests.  Because of the way it was set up, the test suites could come from the versioned file.  That way was new testsuites were added, they would get pulled by everyone.  Tests would be run using the non versioned .xml as the configuration files and the testsuites element would be included from the versioned .dist file in the /tests folder.</p>
  
  <p>The fallback doesn't seem to work like I was thinking however.  The xml parsing seems to get from the .xml file to the .dist file, but it doesn't fallback and return id="test-suites" element, instead the error message is "failed to load external entity "file:/{my_path}/tests/tests/phpunit.xml.dist".</p>
  
  <p>I don't see from the <a href="https://www.w3.org/TR/xinclude/#fallback_element" rel="nofollow noreferrer">documentation</a> for fallback why it wouldn't be working.</p>