true]); Artisan::call('passport:install',['--verbose' => 2]); } /** * test User creation via API * * @return void */ public function testUserCreation() { $response = $this->json('POST', '/api/register', [ 'name' => 'testCreate', 'email' => str_random(10) . '@test.com', 'password' => 'test', ]); $response->assertStatus(200)->assertJsonStructure([ 'success' => ['token', 'name'] ]); } /** * test User login via API * * @return void */ public function testUserLogin() { $response = $this->json('POST', '/api/login', [ 'email' => 'test@test.com', 'password' => 'test' ]); $response->assertStatus(200)->assertJsonStructure([ 'success' => ['token'] ]); } }