Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Tests

Laravel Tests Laravel Package

adroit11/laravel-tests

Reusable Laravel testing package with publishable test stubs, custom assertions, and helper utilities. Drop into Laravel 10/11 (PHP 8.1+) and run with PHPUnit or Pest to speed up common feature and integration testing setups.

View on GitHub
Deep Wiki
Context7

Reuseable laravel tests boilerplate

Frequently asked questions about Laravel Tests
How do I install and publish test stubs for Laravel 10/11 using adroit11/laravel-tests?
Run `composer require adroit11/laravel-tests` to install, then execute `php artisan vendor:publish --tag=laravel-tests` to copy pre-built test files into your `tests/Feature` directory. The package integrates seamlessly with Laravel’s default testing structure.
Does this package work with Pest alongside PHPUnit?
Yes, it’s designed for both PHPUnit (Laravel’s default) and Pest. However, Pest users may need to manually adjust test file paths or naming conventions to match the package’s published stubs, as Pest often uses a different directory structure.
What Laravel versions and PHP versions does adroit11/laravel-tests support?
The package officially supports Laravel 10 and 11 with PHP 8.1+. While it may work on older Laravel versions, the package is not actively tested or maintained for Laravel 8/9, so use at your own risk.
Can I customize the published test stubs or add my own assertions?
Yes, the published stubs are meant to be extended. Override methods in the provided test classes or add custom assertions in your project’s `TestCase` or helper files. The package intentionally avoids hardcoding logic to allow flexibility.
Will this package slow down my CI/CD pipeline due to test parallelization?
The package doesn’t inherently support parallel test execution, but it’s compatible with PHPUnit’s `--parallel` or Pest’s `--parallel` flags. Ensure your CI environment is configured to handle parallel tests, as the package relies on Laravel’s default transaction-based testing.
Are there any known conflicts with Laravel’s built-in test helpers or Pest plugins?
Minimal conflicts are expected, but if you’re using custom PHPUnit configurations (e.g., `phpunit.xml`) or Pest plugins, you may need to adjust test file paths or assertions. The package assumes default Laravel testing setups.
How does this compare to writing custom test traits or using Pest’s @test syntax?
This package provides a full suite of reusable test stubs and helpers, reducing the effort of writing boilerplate from scratch. Pest’s `@test` syntax is more lightweight for simple cases, while custom traits offer granular control—this package strikes a balance for teams needing consistency.
Does the package support testing Laravel queues, events, or real-time features like WebSockets?
The package includes basic test stubs for common Laravel features, but advanced scenarios like queues, events, or WebSockets may require manual extensions. The provided helpers focus on reducing boilerplate for CRUD, API, and feature tests.
How do I migrate an existing test suite to use this package’s structure?
Start by publishing the package’s stubs, then gradually replace one test file at a time (e.g., `UserTest`). Update your CI pipeline to account for any path changes, and deprecate custom traits or helpers that overlap with the package’s features.
Is adroit11/laravel-tests actively maintained? What if Laravel’s testing APIs change?
The package shows low activity (2 stars, no dependents), so maintenance risks exist. If Laravel’s testing APIs evolve (e.g., new assertions or traits), you may need to fork or extend the package. Always test thoroughly after updates.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver