Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As Juhana commented you should first of all fix your code where the warning(s) appear. It's a sign that the code is not working properly / strictly.</p> <blockquote> <p>By default, PHPUnit converts PHP errors, warnings, and notices that are triggered during the execution of a test to an exception.</p> </blockquote> <p>See <a href="http://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.errors" rel="nofollow noreferrer">Testing PHP Errors</a> which has more information how to test for your warnings (and how to ignore warnings in sub-routines you call in tests).</p> <p>To disable the default behaviour, you can tell PHPUnit to do so in your tests, e.g. within the <code>setUp</code> of your test or the test itself by setting a static variable in the global namespace:</p> <pre><code># Warning: PHPUnit_Framework_Error_Warning::$enabled = FALSE; # notice, strict: PHPUnit_Framework_Error_Notice::$enabled = FALSE; </code></pre> <p>Another option to change the default behaviour is to <a href="http://www.phpunit.de/manual/current/en/appendixes.configuration.html" rel="nofollow noreferrer">configure the testrunner with an XML file</a> with the following settings:</p> <pre><code>&lt;phpunit convertErrorsToExceptions="false" convertNoticesToExceptions="false" convertWarningsToExceptions="false"&gt; &lt;/phpunit&gt; </code></pre> <p>These three options are not available as command-line switches.</p> <p>See as well the related question: <a href="https://stackoverflow.com/q/1225776/367456">test the return value of a method that triggers an error with PHPUnit</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload