Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

why is phpunit not taking directory which have a underscore '_'

Tags:

php

phpunit

My command:

phpunit --log-junit /log/unitreport.xml --coverage-clover /log/result.xml --coverage-    html /log/coverage /sites/all/modules/delete_shopping_cart/

Files to test which are in the directory:

delete_shopping_cart_Test.php another_Test.php

Output:

Cannot open file "/sites/all/modules/delete/shopping/cart/.php"

why is phpunit taking the '_" of the directory and treating it as a '/' ?

how do I change this so that it goes to the correct location.

like image 765
Vishal Khialani Avatar asked Dec 10 '25 17:12

Vishal Khialani


1 Answers

Autoloaders tend to treat underscores as separate directories:

A_B_C

becomes

+- A
|  +- B
|  |  +- C
like image 196
Steven Scott Avatar answered Dec 13 '25 05:12

Steven Scott