You are doing everything right.
1) The first way to add a folder . My correct way was:
phpunit tests/EWalletTest
I had the same errors when I forgot to start from the tests folder
phpunit EWalletTest
I got
Cannot open the file "EWalletTest.php".
2) A filter is another option. read an example here :
phpunit --filter EWallet
Runs only tests whose name matches the given regular expression pattern.
This means that you have EWalletTest and EWalletFooTest and test cases from other files with names such as' test_EWallet_with_Australian_dollar.
source share