Level 1
I just realized I was doing something wrong, as Artisan::call would not return any output. If you want the output of your previous command you should call Artisan::output().
My test works now.
I am trying to set up functional tests from my artisan commands using codeception with Lumen module.
However using Artisan::call does not give me any results.
use Illuminate\Support\Facades\Artisan;
$I = new FunctionalTester($scenario);
$I->wantTo('Test artisan command');
$value = Artisan::call('config:get', ['app.key']);
assert($value != 0, 'The application key is set.');
I am curious if anyone tried this before, and how they manage to implement it.
Thanks.
I just realized I was doing something wrong, as Artisan::call would not return any output. If you want the output of your previous command you should call Artisan::output().
My test works now.
Please or to participate in this conversation.