PHPUnit/using PHPUnit: Difference between revisions

No edit summary
No edit summary
Line 42: Line 42:
No tests executed!
No tests executed!
</pre>
</pre>
because the value is not delimited and wouldn't work "as is". The required format of the <tt>--filter</tt> parameter is defined as basically equivalent to the __METHOD__ magic constant. The expected parameter value is a '''pattern''', so if not enclosed in delimiters, the '/' delimiter will '''automatically''' be added. [https://docs.phpunit.de/en/9.6/textui.html See the v9.6 docs]
because the value is not delimited and wouldn't work "as is". The required format of the <tt>--filter</tt> parameter is defined as basically equivalent to the __METHOD__ magic constant. Also, the expected parameter value is a '''pattern''', so if not enclosed in delimiters, the '/' delimiter will '''automatically''' be added. [https://docs.phpunit.de/en/9.6/textui.html See the v9.6 docs]


From the docs, valid <code>--filter</code> parameter examples are:
From the docs, valid <code>--filter</code> parameter examples look like this:
<pre>
<pre>
--filter 'TestNamespace\\TestCaseClass::testMethod'
--filter 'TestNamespace\\TestCaseClass::testMethod'