title: PHPUnit - Why would PHPUnit appear to be running in strict mode?
body: <p>The question: Why would PHPUnit appear to be running in strict mode?</p>
  
  <p>The issue:</p>
  
  <blockquote>
    <p>PHPUnit 4.3.1 by Sebastian Bergmann.</p>
    
    <p>Configuration read from /full/path/to/configuration.xml</p>
    
    <p>R</p>
    
    <p>Time: 2.65 seconds, Memory: 11.50Mb</p>
    
    <p>OK, but incomplete, skipped, or risky tests! Tests: 1, Assertions: 1,
    Risky: 1.           Done.</p>
  </blockquote>
  
  <p>Also:</p>
  
  <blockquote>
    <p>Risky Test: Test code or tested code did not (only) close its own
    output buffers</p>
  </blockquote>
  
  <p>My PHP Version is 5.4.</p>
  
  <p>As stated in the documentation (<a href="https://phpunit.de/manual/current/en/strict-mode.html">https://phpunit.de/manual/current/en/strict-mode.html</a>) this only appears to apply to PHPUnits' strict mode setting.</p>
  
  <blockquote>
    <p>PHPUnit can perform additional checks while it executes the tests. In
    addition to the fine-grained control over the various strict mode
    checks (see below) you may use the --strict commandline option or set
    strict="true" in PHPUnit's XML configuration file to enable all of
    them.</p>
  </blockquote>
  
  <p>-</p>
  
  <blockquote>
    <p>Output During Test Execution</p>
    
    <p>PHPUnit can be strict about output during tests. This check can be
    enabled by using the --disallow-test-output option on the commandline
    or by setting beStrictAboutOutputDuringTests="true" in PHPUnit's XML
    configuration file.</p>
    
    <p>A test that emits output, for instance by invoking print in either the
    test code or the tested code, will be marked as risky when this check
    is enabled.</p>
  </blockquote>
  
  <p>I believe though, that I did not activate strict mode. My command line is "/usr/bin/php /usr/bin/phpunit --colors --bootstrap /full/path/to/bootstrap.php --configuration /full/path/to/configuration.xml /full/path/to/Test.php". I also used the configuration as provided at "<a href="https://phpunit.de/manual/current/en/appendixes.configuration.html">https://phpunit.de/manual/current/en/appendixes.configuration.html</a>".</p>
  
  <pre><code>&lt;phpunit
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.3/phpunit.xsd"
     backupGlobals="true"
     backupStaticAttributes="false"
     cacheTokens="false"
     colors="false"
     convertErrorsToExceptions="true"
     convertNoticesToExceptions="true"
     convertWarningsToExceptions="true"
     forceCoversAnnotation="false"
     mapTestClassNameToCoveredClassName="false"
     printerClass="PHPUnit_TextUI_ResultPrinter"
     processIsolation="false"
     stopOnError="false"
     stopOnFailure="false"
     stopOnIncomplete="false"
     stopOnSkipped="false"
     testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
     timeoutForSmallTests="1"
     timeoutForMediumTests="10"
     timeoutForLargeTests="60"
     strict="false"
     verbose="false"&gt;
  &lt;/phpunit&gt;
  </code></pre>
  
  <p>I had used a shorter version of this configuration previously which provided the same result.</p>
  
  <pre><code>&lt;phpunit
     beStrictAboutOutputDuringTests="false"
     strict="false"
     colors="false"&gt;
  &lt;/phpunit&gt;
  </code></pre>