Home » Php » php – 'vendor' is not recognized as an internal or external command I'm using windows 10. what should I do?

php – 'vendor' is not recognized as an internal or external command I'm using windows 10. what should I do?

Posted by: admin July 12, 2020 Leave a comment

Questions:

I’ve recently installed laravel and have written some tests in /tests directory but when I use phpunit at cmd in the same folder that phpunit.xml exists, it says ‘vendor’ is not recognized as an internal or external command I’m using windows 10. what should I do?

How to&Answers:

This is linux based code..

$ vendor/bin/phpunit

Try this for windows..

vendor\bin\phpunit

Answer:

Please try this command for windows:

php vendor/phpunit/phpunit/phpunit

Answer:

  1. Install dependencies via composer

    $ composer update

  2. Run tests

    $ vendor/bin/phpunit