I tried to test my commands in Laravel 4, because they are a significant part of my system, but it seems that the documentation coverage is so low that they explain only basic testing of controllers and some models.
In commands, you can pass arguments through the command line to the class and receive through the $ this-> input property, which I don’t know how to emulate.
Whenever I try to run a test for my team, when it expects an argument in the fire method, I get this error:
Fatal error: Call to a member function getArgument() on a non-object in /var/www/html/project/vendor/laravel/framework/src/Illuminate/Console/Command.php on line 153
Which is logical, the argument is not passed. Is there any way to test this functionality? ...
thanks
php unit-testing laravel-4
deb0rian
source share