gerardroche / sublime-phpunit

PHPUnit Sublime Text integration.
https://www.gerardroche.com
GNU General Public License v3.0
74 stars 11 forks source link

Error "PHPUnit: working directory not found" #97

Closed mzubairharoon closed 4 years ago

mzubairharoon commented 4 years ago

Hi, thank you for your extension, I'm getting some error with it, I've installed it through Package Control, as I try to run the test, it reports error.

phpunit

I can't get it working, is something missing from my end? my project is laravel, with PHP 7.2

Thank you

gerardroche commented 4 years ago

Can you post some debug information. See https://github.com/gerardroche/sublime-phpunit/blob/master/CONTRIBUTING.md#debugging

The plugin looks for the working directory by looking for either phpunit.xml (first) or phpunit.xml.dist.

It tries to find that configuration file by looking backwards up the path from the current file, for example given the file /path/to/file.php it will look for the configuration file in:

  1. /path/to/
  2. /path/
  3. /

Whatever directory the configuration file is found in is considered the working directory. If you're using composer to install phpunit then PHPUnitKit will use the installed phpunit to run the tests, which would be at {working_dir}/vendor/bin/phpunit.