PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, January 7, 2022

[FIXED] Laravel : phpunit cannot open file ExampleTest.php

 January 07, 2022     composer-php, laravel, php, phpunit     No comments   

Issue

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.


Solution

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

Example:

phpunit tests/ExampleTest.php


Answered By - Leonardo Emanuel Alifraco
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing