omnicode/lara-test
Omnicode Lara-Test is a Laravel testing package that provides helpers and utilities to streamline PHPUnit/Pest test setup, everyday assertions, and common testing workflows for Laravel applications.
Before writing any code, do due diligence — this package has no stars, no dependents, and no score, so treat it as unvetted until you've read the source.
Confirm installability.
composer require --dev omnicode/lara-test
If it fails, inspect composer.json in the repo for a require block pinning laravel/framework to an old major — that alone usually kills adoption on Laravel 11/12.
Read three files first, in this order:
composer.json — PSR-4 namespace, extra.laravel.providers (auto-discovery), and version constraints.src/ — the service provider, any TestCase base class, and any traits. That is the entire public API surface for a package this size.README.md — the only reliable documentation you'll get.Publish config only if a config file exists.
php artisan vendor:publish --provider="Omnicode\LaraTest\LaraTestServiceProvider"
Verify the FQCN from src/ — do not copy the namespace I guessed above.
First use case: wire it into exactly one test file. Make your tests/TestCase.php extend the package's base case (or use its trait), then run:
php artisan test --filter=PackageSmokeTest
Get green in isolation before touching the rest of the suite. Roll out incrementally.
Single inheritance point. Have your application's tests/TestCase.php extend the package's test case (or apply its traits) so the rest of your suite never imports the package namespace directly. That gives you one file to change if the package is abandoned or swapped.
// tests/TestCase.php
namespace Tests;
use Omnicode\LaraTest\TestCase as PackageTestCase;
abstract class TestCase extends PackageTestCase
{
use CreatesApplication;
}
Apply helper traits per-class, not globally. If the package ships assertions or fakes, use them in the specific test classes that need them. Global application changes assertion behavior across the entire suite in ways that are painful to bisect later.
Wrap package setup in lifecycle hooks. Put any package-specific bootstrapping in setUp()/tearDown() on your base TestCase, and pair every setup with cleanup. This matters most under Pest, where hooks resolve differently than PHPUnit's.
Keep fixtures in your repo, not in vendor/. Store package-shaped fixtures under tests/Fixtures/ and resolve paths via base_path() or __DIR__. Files referenced from vendor/ disappear on composer update.
Serial first, parallel second. Run the suite without --parallel until you've confirmed the package doesn't use static state or shared DB connections. Then test php artisan test --parallel in CI and compare results.
Composer script as the entry point:
"scripts": {
"test": ["@php artisan test"]
}
extra.laravel.providers. If so, register manually: bootstrap/providers.php on Laravel 11+, config/app.php on 10 and below.--dev. Then verify nothing leaked into production:
composer why omnicode/lara-test
composer show --tree | grep lara-test
app.testing, testing.*). After publishing, grep -rn "config(" vendor/omnicode/lara-test/src and check for clashes with your phpunit.xml env vars.used and the provider booted. Quick check: php artisan tinker with APP_ENV=testing, then app()->getProviders().vendor/bin/phpunit --debug --filter=YourTest
php artisan test --stop-on-failure
tests/Support/ rather than forking — forking an unmaintained package means you own it forever.composer.json ("omnicode/lara-test": "1.0.*" at minimum, ideally an exact tag) and check the last commit date and license before committing to it.composer.lock so CI and local runs resolve identically; an unpinned test-helper package that breaks under a patch release will cost you a day.How can I help you explore Laravel packages today?