开发者

Cygwin and PHPUnit: Could not open input file: /cygdrive/c/xampp/php/phpunit

开发者 https://www.devze.com 2022-12-20 09:39 出处:网络
Is there a way to run PHPUnit from Cygwin? Everytime I run PHPUnit I get this error: Could not open input file: /cygdrive/c/xampp/php/phpunit

Is there a way to run PHPUnit from Cygwin? Everytime I run PHPUnit I get this error:

Could not open input file: /cygdrive/c/xampp/php/phpunit

I am trying to run my unit tests in my Zend Framework App. I am trying to use Cygwin because I am more familiar with *Nix commands (I'm no expert thoug开发者_如何学Ch) rather than Windows.

Thanks, Wenbert


same problem here, solved it by an alias added to ~/.bash_profile

alias phpunit="/cygdrive/c/xampp/php/php C:/xampp/php/phpunit"


I am having the same problem, I can't get "phpunit" to work by itself, I am using Wamp.

However, I was able to run "phpunit.bat" and it worked for me.

Still can't get the ANSI colors to show up though :(


Does /cygdrive/c/xampp/php/phpunit exist? If so what are the permissions on the file?

Try

ls -l /cygdrive/c/xampp/php/phpunit


Let's use phpunit as dependency and in folder above vendor try:

ln -s vendor/phpunit/phpunit/composer/bin/phpunit phpunit

It will create for you a symbolic link to real path of phpunit


You could just directly call it by using Windows path in Cygwin:

C:/xampp/php/phpunit --version

So you could set an alias for ~/.bash_profile:

alias phpunit="C:/xampp/php/phpunit"
0

精彩评论

暂无评论...
验证码 换一张
取 消