Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPUnit Dry Run or Discover Test without executing

Tags:

php

phpunit

I would like to write a script that "discovers" PHPUnit test in a given folder.

Currently I can execute:

phpunit . 

And all my test names are shown however they are executed which can take quite a bit of time.

What I would like is the ability to view which test I have in a project without actually executing the test. In a format similar to

ExampleTest::testNameHere 

Is this possible?

Thank you for your time.

like image 652
user3188586 Avatar asked Mar 09 '26 21:03

user3188586


1 Answers

You're looking for:

--list-tests

like image 115
Louis Avatar answered Mar 12 '26 11:03

Louis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!