Reputation: 43
I'm doing a tutorial on Laracast to learn Laravel. Now I'm kind of stuck on one part which I don't want to skip (first 40 seconds).
The problem is when I open PHP artisan tinker and do the command: phpunit (or vendor/bin/phpunit) it gives me the error:
PHP Notice: Use of undefined constant phpunit - assumed 'phpunit' in /var/www/vhosts/web-wings.nl/roylar.web-wings.nleval()'d code on line 1
and
PHP Notice: Use of undefined constant vendor - assumed 'vendor' in /var/www/vhosts/web-wings.nl/roylar.web-wings.nleval()'d code on line 1
Also when I try
phpunit tests/Unit/ExampleTest.php
It gives the error:
PHP Parse error: Syntax error, unexpected T_STRING on line 1
So there's definitely something wrong with phpunit but I can't find the answer. I looked into the tutorial's comments, Youtube and Google but nothing.
Upvotes: 0
Views: 462
Reputation: 15115
nothing wrong with phpunit you just test without using php artisan tinker
because the tinker command uses the PsySH
library to setup a REPL (read-eval print loop)
environment within the context of your Laravel application
Upvotes: 1