Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel : phpunit cannot open file ExampleTest.php

Hi i am quit new in Laravel PHPUnit, getting the following error :

Laravel : phpunit cannot open file ExampleTest.php

I don't have idea why i am getting this error. I installed PHPUnit globally and when i run "phpunit" in terminal it runs fine. But I want to run it on specific file like :

phpunit ExampleTest

Thanks In Advance.

like image 984
Wahid Nahiyan Avatar asked Apr 23 '16 14:04

Wahid Nahiyan


1 Answers

Make sure you are on the project root and referencing the file inside the tests folder.

Example:

phpunit tests/ExampleTest.php
like image 65
Leonardo Emanuel Alifraco Avatar answered Oct 05 '22 00:10

Leonardo Emanuel Alifraco