hs-dev2 MR
hs-dev2 MR

Reputation: 222

How to run specific files in PHPUnit?

I can run one file only by phpunit --filter=Test1

But I want to run two files . How can I achieve . I tried like..

phpunit --filter=Test1,Test2 but no executed test only

phpunit --filter=Test1, --filter=Test2 but Test2 execute only

Upvotes: 5

Views: 2027

Answers (1)

potiev
potiev

Reputation: 586

You should use regular expressions. For example

phpunit --filter 'Test1|Test2'

You can use offical documentation https://phpunit.readthedocs.io/en/stable/textui.html#command-line-options

Upvotes: 7

Related Questions