[2.x] Add the ability to publish and use test stubs #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar to pestphp/pest#596 this PR aims to allow the following Pest Tests stubs to be published into a Laravel project and modified for each specific project's requirements:
The adjusted logic generates an outcome similar to the Laravel's existing
artisan stub:publish
andartisan make:test
commands.To publish the Pest stubs, the new
artisan pest:publish
command can be used, the stubs will be published as:These will then be found in the stubs directory on the project root.
The command behaves similarly to
artisan stub:publish
and has the--existing
and--force
options available for use.artisan pest:dataset
andartisan pest:test
will generate files from the published stubs if they are present, otherwise the ones from thephppest/pest
package will be used.