Install any skill in seconds. Free to start, no credit card required.
Get Started Free →fbarrento/pest-package-tests
Writes Pest tests for framework-agnostic PHP packages using Francisco Barrento's testing and naming conventions, with fbarrento/data-factory as the default for data-object test data.
Passed 22 of 22 test cases with the skill, and 12 of 22 without it.
and 11 more in the full report
10 fixed12 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
The instructions your model reads when the skill loads.
Use this skill for standalone Composer packages that do not boot Laravel. There is no service container, no Laravel fakes, and no Eloquent. Resolve collaborators with new, build test data with fbarrento/data-factory for data objects, and roll in-memory doubles for service dependencies.
When testing inside a full Laravel application instead, prefer the laravel-rules skill.
use FBarrento\DataFactory\Factory;
use Vendor\Package\Actions\CreateWaitlistSignup;
use Vendor\Package\Data\CreateWaitlistSignupData;
beforeEach(function (): void {
$this->createWaitlistSignup = new CreateWaitlistSignup();
});
test('creates a waitlist signup from data',
/**
* @throws Exception
*/
function (): void {
$data = CreateWaitlistSignupData::factory()->make();
$waitlistSignup = $this->createWaitlistSignup->handle($data);
expect($waitlistSignup->id)->toBeString()
->and($waitlistSignup->email)->toBe($data->email)
->and($waitlistSignup->createdAt)->not->toBeNull();
});
rules/testing.mdtest() for Pest tests, never it().->and() instead of separate expect() blocks.new in beforeEach() and assign them to $this.test cases passed, vs 12 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.