Run test methode in phpunit Testsuite

160
May 22, 2018, at 02:40 AM

I would like to create a testsuite which will run a list of test methods. I just found a way to run the whole file. Is there a way to just run a specific methode? like so:

<phpunit bootstrap="src/autoload.php">
  <testsuites>
    <testsuite name="money">
      <file>tests/IntlFormatterTest.php::test1</file>
      <file>tests/IntlFormatterTest.php::test5</file>
      <file>tests/CurrencyTest.php::test7</file>
    </testsuite>
  </testsuites>
</phpunit>
Answer 1

That is not possible (and not desirable) to configure using the XML configuration file.

What you want is to use --filter to dynamically select the tests to execute.

Rent Charter Buses Company
READ ALSO
Problems with apache2 and php server in SunOs

Problems with apache2 and php server in SunOs

I'm trying to install Apache2 and PHP5 on a SunOS server, the problem is that the command

136
For loop with Curl request - PHP

For loop with Curl request - PHP

I'm checking against a list of address books (outputted as checkboxes) to see which books the user has selectedFor the selected ones I'm adding them to an ESP via their API using curl

179
PHP Warning: mysqli_query() expects parameter 1 to be mysqli, null given

PHP Warning: mysqli_query() expects parameter 1 to be mysqli, null given

Sorry for the duplicate question but can someone please help me solve this? Am a PHP newbie and none of the solutions seem to be working

179
What is the most efficient way to get label from ACF select field with sub_field_object?

What is the most efficient way to get label from ACF select field with sub_field_object?

I have an Advanced custom fields select field, which is populated with the values of a repeater field on a different page

133