user11632242
user11632242

Reputation: 63

Running multiple directories with PHPUnit 8.5

If I want to run all test files within a directory I can run phpunit tests/path/to/directory. However if I run phpunit tests/path/1 tests/path/2 where 1 and 2 are both directories containing test files, it complains that Fatal error: Uncaught PHPUnit\Runner\Exception: Class 'tests/path/1' could not be found. How can I run both directories in one command?

Upvotes: 1

Views: 233

Answers (1)

Sebastian Bergmann
Sebastian Bergmann

Reputation: 8346

The best practice is to not invoke the PHPUnit test runner with path(s) on the CLI but configure the path(s) in your XML configuration file.

Upvotes: 3

Related Questions