Laravel 4 testing; 'phpunit' is not recognized?

后端 未结 5 1196
旧时难觅i
旧时难觅i 2021-02-03 22:46

http://four.laravel.com/docs/testing Says \"After installing a new Laravel application, simply run phpunit on the command line to run your tests.\"

ph

5条回答
  •  孤独总比滥情好
    2021-02-03 23:08

    If you are a window user and you are having this issue, do this:

    You need to tell Window where to find PHPUnit command, you can first of all verify that this file exists in your Laravel project under /vendor/bin

    enter image description here

    Finally you need to append the full path to /vendor/bin in your window PATH variable,

    To do this: 1. Right-click on 'Computer' then click properties

    enter image description here

    1. On the second window click Advanced system settings

    enter image description here

    1. On the next window under Advanced click Environmental Variables

    enter image description here

    1. On the next window double-click PATH then set PATH variable by appending

    the full path to your laravel-project/vendor/bin; Notice the ; at the end.

    NB: Other variables might already exists in the PATH, so ensure you don't overwrite them by appending your own at the very end

    1. Finally click Ok on all the dialog boxes

    enter image description here

提交回复
热议问题