Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for installing Pest into a Lumen application #18

Merged
merged 3 commits into from
May 24, 2020

Conversation

michaeldyrynda
Copy link
Collaborator

This entails creating Laravel and Lumen-specific stubs, and ensuring that the appropriate stubs are copied as part of the pest install.

The stubs/Lumen/Pest.php file needs to be updated before this can be merged

As uses(TestCase::class) has no effect without the call to ->in(), so tests won't actually work in a Lumen application because there is no namespace to load from.

Adding a call to uses(TestCase::class) in a test file itself does work, so it's possible to use Pest with Lumen, but will need the manual call in each test file at this stage.

This entails creating Laravel and Lumen-specific stubs, and ensuring
that the appropriate stubs are copied as part of the pest install.
@owenvoke
Copy link
Member

Can you not use uses(TestCase::class)->in(__DIR__)?

@michaeldyrynda
Copy link
Collaborator Author

So you can!

@michaeldyrynda michaeldyrynda marked this pull request as ready for review May 24, 2020 04:07
@nunomaduro nunomaduro merged commit 4de6019 into pestphp:master May 24, 2020
@nunomaduro
Copy link
Member

Thanks @michaeldyrynda !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants