2016-11-16 15 views
10
भीतर PHPUnit भागने की कोशिश कर

मैं एक Yii2 बुनियादी स्थापना के भीतर phpunit भागने की कोशिश कर रहा हूँ, लेकिन जब भी मैं कमांड लाइन से php vendor/bin/phpunit चलाने मैं इस उत्पादन प्राप्त करें:Cygwin मुद्दा जब Yii2

नोट: मैं Windows पर हूँ 7.

dir=$(d=${0%[/\\]*}; cd "$d"; cd "../phpunit/phpunit" && pwd) 

# See if we are running in Cygwin by checking for cygpath program 
if command -v 'cygpath' >/dev/null 2>&1; then 
     # Cygwin paths start with /cygdrive/ which will break windows PHP, 
     # so we need to translate the dir path to windows format. However 
     # we could be using cygwin PHP which does not require this, so we 
     # test if the path to PHP starts with /cygdrive/ rather than /usr/bin 
     if [[ $(which php) == /cygdrive/* ]]; then 
       dir=$(cygpath -m "$dir"); 
     fi 
fi 

dir=$(echo $dir | sed 's/ /\ /g') 
"${dir}/phpunit" "[email protected]" 

कोई भी सलाह दे सकता है कि समस्या क्या है? क्या हो रहा है यह सुनिश्चित करने से पहले मैंने phpunit का उपयोग नहीं किया है।

फ़ाइल vendor/bin/phpunit नहीं है PHP स्क्रिप्ट, लेकिन खोल स्क्रिप्ट:

+0

क्या आपने [यह SO सवाल] जांच लिया है (http://stackoverflow.com/questions/2266661/cygwin-and-phpunit-could-not-open-input-file-cygdrive-c-xampp-php-phpunit) ? – Bizley

+0

@ बिज़ले धन्यवाद, मुझे एक नज़र आएगी। – Brett

उत्तर

8

खैर, यह एक स्पष्ट समाधान था।

शुरुआत से php निकालें और बस vendor/bin/phpunit चलाएं।

Source