Add support for installing Pest into a Lumen application

This entails creating Laravel and Lumen-specific stubs, and ensuring
that the appropriate stubs are copied as part of the pest install.
This commit is contained in:
Michael Dyrynda
2020-05-23 20:52:15 +09:30
parent ce14ffd49a
commit 4496e9d9ee
7 changed files with 44 additions and 2 deletions

12
stubs/Laravel/Helpers.php Normal file
View File

@ -0,0 +1,12 @@
<?php
use Illuminate\Contracts\Auth\Authenticatable;
use Tests\TestCase;
/**
* Set the currently logged in user for the application.
*/
function actingAs(Authenticatable $user, string $driver = null): TestCase
{
return test()->actingAs($user, $driver);
}