selective/test-traits
Selective Test Traits provides reusable PHPUnit and Pest traits for Laravel, helping you cut test boilerplate, keep suites focused, and share common setup across tests. It makes cleaner, more maintainable tests easier to write without repeating helpers.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| stephenjude/api-test-helper | 0.86 | stephenjude/api-test-helper is a Laravel package that streamlines API testing with convenient helpers and expressive assertions for HTTP and JSON responses. It reduces boilerplate around authentication, request building, and response checks, helping you write cleaner, faster, more reliable API test... | 47 | — | 1 | — | 0 | 0.3 | — | MIT | 3 years ago | |
| anthonyedmonds/laravel-testing-traits | 0.86 | Reusable testing traits for Laravel packages and applications. Add common test helpers to your suite with minimal setup, keeping tests concise and consistent. Ideal for teams standardizing Laravel test patterns. | 0 | — | 0 | — | 0 | 18.7 | — | MIT | 1 month ago |
|
| padraic/phpunit-extensions | 0.86 | A collection of extensions and helpers for PHPUnit by Padraic Brady, offering convenience assertions, mock utilities, and testing shortcuts that reduce boilerplate and help you write cleaner, more maintainable PHP unit tests. | 17 | 17 | 4 | 353 | 0 | 0.1 | 12.8 | BSD-3-Clause | 9 years ago | |
| phpspec/prophecy-phpunit | 0.85 | Integrates the Prophecy mocking library with PHPUnit for simpler, cleaner test doubles. Install via Composer and use the ProphecyTrait to call prophesize() inside your TestCase, set method predictions/returns, and reveal mocks for injection. | 195 | 195 | 39 | 1M | 1 | 11.7 | 56.7 | MIT | 8 months ago | |
| kkszymanowski/traitor | 0.85 | Traitor brings traits to Eloquent like first-class relations. Define reusable, composable model fragments and access them via $model->traitName, eager load with with('traitName'), and query through them—keeping models slim while sharing behavior and attributes. | 130 | 130 | 3 | 150K | 1 | 3.5 | 41.9 | MIT | 2 years ago | |
| graham-campbell/testbench-core | 0.84 | Laravel TestBench Core by Graham Campbell provides reusable testing functionality for Laravel packages and applications, supporting PHPUnit 9-12 and Laravel 8-13 on PHP 7.4-8.5. | 0 | 17 | — | 5K | — | 9.0 | 51.6 | — | — | |
| pestphp/pest-plugin-laravel | 0.84 | Pest Plugin for Laravel adds Laravel-specific testing helpers and integration to Pest, making it easy to write expressive, fast tests for Laravel apps while leveraging the familiar Laravel testing ecosystem. | 234 | 240 | 46 | 9M | 0 | 2.6 | 55.3 | MIT | — | |
| micro-module/unit-test-generator | 0.84 | Micro Module's Unit Test Generator scaffolds PHPUnit tests for Laravel/PHP code, turning existing classes into ready-to-edit test files to cut boilerplate and speed up initial coverage. It helps bootstrap suites and standardize structure, leaving assertions for you to refine. | 1 | 1 | 0 | 16 | 0 | 0.0 | 13.2 | — | 3 years ago | |
| ponich/eloquent-traits | 0.84 | A collection of reusable traits for Laravel Eloquent models that helps cut boilerplate by adding common model behaviors through simple trait imports, keeping your codebase cleaner and more consistent. | 18 | 18 | 2 | 0 | 1 | 0.3 | — | MIT | — | |
| omnicode/lara-test | 0.84 | 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. | 0 | 1 | — | 0 | — | 0.0 | — | — | — | |
| herrera-io/phpunit-test-case | 0.84 | PHPUnit TestCase class and Extras trait that add helpers for common test chores: create/delete temporary files and directories, call protected/private methods, and get/set protected/private properties. Use as a base class or mix into your own test case. | 1 | 1 | 0 | 32 | 0 | 0.0 | 12.0 | MIT | — | |
| phalcon/traits | 0.84 | Phalcon Traits offers reusable traits with methods for Phalcon v6 and later, plus handy snippets for common tasks. It includes wrappers around PHP functions so developers can mock behavior, test application paths, and avoid reinventing the wheel. Useful beyond Phalcon for testable utilities. | 7 | 6 | 4 | 14K | 0 | 23.8 | 52.4 | MIT | 1 week ago | |
| laragear/meta-testing | 0.84 | Laragear Meta Testing provides testing helpers and assertions for Laravel applications that use metadata. Verify metadata creation, updates, and retrieval with concise, readable tests, keeping metadata behavior reliable without repetitive boilerplate. | 3 | 3 | 1 | 561 | 0 | 17.6 | 34.2 | MIT | 1 month ago | |
| pkly/phpunit-service-create-trait | 0.84 | A PHPUnit 12+ trait (PHP 8.4+) that builds real service instances with auto-mocked constructor and #[Required] dependencies. Dependencies stay as invisible stubs until fetched, so you only get mock verification where you ask for it. | 0 | 0 | 0 | 289 | 0 | 20.8 | 39.4 | MIT | 1 month ago | |
| maks3w/phpunit-methods-trait | 0.84 | PHP trait exposing PHPUnit TestCase helper methods for use inside reusable test traits. Lets traits call mocking, expectations, and other TestCase APIs without extending TestCase directly; assertions are via PHPUnit\Framework\Assert. | 1 | 2 | 1 | 14 | 0 | 2.8 | 12.5 | NOASSERTION | 5 years ago | |
| sven/laravel-testing-utils | 0.84 | Practical testing helpers for Laravel applications, including cleaner assertions, setup shortcuts, and conveniences for HTTP, database, and mocking workflows. Designed to keep PHPUnit and Pest suites readable, consistent, and fast without extra boilerplate. | 21 | 24 | 1 | 12 | 1 | 0.1 | 1.8 | MIT | 6 years ago | |
| mtownsend/laravel-make-trait | 0.84 | Adds a make:trait Artisan command to Laravel, letting you scaffold PHP traits from the CLI just like make:model or make:controller. Generates a clean trait stub in the right namespace automatically, saving boilerplate and keeping reusable trait files consistent across your project. | 14 | 14 | 5 | 237 | 0 | 0.2 | 16.9 | MIT | 3 years ago | |
| sebastian/peek-and-poke | 0.84 | sebastian/peek-and-poke is a small PHP utility that uses reflection to peek at and poke into objects. It lets you read and write private and protected properties, making it handy for tests that need to inspect or set up object state without changing production code. | 36 | 34 | 8 | 117 | 1 | 0.3 | 6.0 | NOASSERTION | — | |
| phpunitgoodpractices/traits | 0.84 | A small set of PHP traits to improve PHPUnit test code by reducing boilerplate and encouraging cleaner, reusable assertions and setup patterns. Useful for Laravel and general PHP projects that want more readable, maintainable tests. | 21 | 22 | 1 | 15K | 3 | 2.6 | 28.1 | MIT | 4 years ago | |
| hughsaffar/laravel-test-trap | 0.84 | Laravel Test Trap is a focused testing helper for Laravel that adds guardrails to your suite, helping catch unintended behavior before it reaches CI. It keeps tests safer and more predictable with minimal setup, making it a useful addition for teams tightening test reliability. | 18 | — | 1 | — | 0 | 0.5 | — | MIT | 3 years ago |
How can I help you explore Laravel packages today?