adrienpsn's avatar

Create password grant tokens in testing

  • Laravel Version: 5.7.*
  • PHP Version: 7.2.9
  • Database Driver & Version: sqlite 7.2.9

Description:

I want to test my oauth server (with laravel/passport package).

I use unit tests, I use a memory database with PHPUnit, so I can not migrate the tables created by the package.

I would like to be able to call the following commands in my test:

$this->artisan('passport:client', ['--password' => null, '--no-interaction' => true]); $this->artisan('passport:keys', ['--no-interaction' => true]);

But, I have this error:

Mockery\Exception\BadMethodCallException: Received Mockery_1_Illuminate_Console_OutputStyle::askQuestion(), but no expectations were specified

I'm sure this is due to the fact that I do not have a fully installed passport but I do not know how to do it.

Steps To Reproduce:

composer require laravel/passport php artisan passport:client --password php artisan passport:keys

0 likes
0 replies

Please or to participate in this conversation.