Weave 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
Test Common

Test Common Laravel Package

mrgoodbytes8667/test-common

Common testing helpers for Laravel packages by mrgoodbytes8667, bundling shared PHPUnit and Pest utilities, test case base classes, and assertions so multiple packages can reuse one consistent test foundation instead of duplicating setup code.

Deep Wiki
Context7

mrgoodbytes8667/test-common provides a shared foundation of testing utilities for Laravel packages in the mrgoodbytes ecosystem. It bundles the boilerplate every package needs—base TestCase classes, service provider helpers, and assertion macros—so downstream packages stay small and consistent instead of duplicating setup code. Add it as a dev dependency and point your tests at its traits for a standardized harness across your suite.

  • Reusable TestCase base classes for package and feature tests
  • Common assertion macros and expectation helpers
  • Shared fixtures and factory support
  • Sensible defaults for Orchestra Testbench bootstrapping
  • Lightweight dev-only dependency with no runtime footprint
Frequently asked questions about Test Common
What is mrgoodbytes8667/test-common used for?
It is a shared testing foundation for mrgoodbytes Laravel packages. It provides a reusable base TestCase, common assertion methods, and small helpers so test suites stay consistent across projects. The goal is to reduce repeated boilerplate that otherwise gets copied between package repositories.
How do I install mrgoodbytes8667/test-common with Composer?
Install it with Composer as a development dependency, since it is a testing package rather than runtime application code. Run composer require --dev mrgoodbytes8667/test-common and let Composer resolve a compatible version for your project. Then extend the provided test case in your own test classes to start using the shared foundation.
How do I use the base TestCase from this package?
Extend the package's provided base TestCase from your package's own test classes instead of extending PHPUnit's TestCase directly. That gives your suite access to the shared setup behavior, assertions, and helpers. Start with one or two test classes to confirm the integration before migrating an entire suite.
What assertions and helpers does mrgoodbytes8667/test-common provide?
The package supplies common assertions and small helpers intended for Laravel package testing, alongside its reusable base TestCase. The exact list should be checked in the package source and README, since it can evolve with releases. The intent is to cover recurring patterns so each package does not reimplement the same test utilities.
Is mrgoodbytes8667/test-common a replacement for PHPUnit or Pest?
No, it is a testing foundation layered on top of your existing test runner rather than a replacement for it. It provides a base TestCase, assertions, and helpers that your PHPUnit or Pest-style tests can build on. You still need a test framework installed and configured in your project.
Which Laravel versions does mrgoodbytes8667/test-common support?
The package is built for Laravel package testing, but the supported Laravel and PHP version ranges are defined by its Composer requirements. Check the composer.json constraints for the release you install rather than assuming compatibility with every Laravel version. If you maintain multiple Laravel branches, pin or constrain this dev dependency per branch as needed.
Can I use this package for application tests or only for Laravel packages?
It is described as a shared testing foundation for mrgoodbytes Laravel packages, so its primary audience is package test suites. Application test suites may still benefit from the base TestCase and assertions, but the helpers are shaped around package-level testing needs. Evaluate the provided utilities against your application's existing test conventions before adopting it broadly.
Does mrgoodbytes8667/test-common work with Orchestra Testbench?
The package is aimed at Laravel package testing, where Orchestra Testbench is a common foundation, but compatibility is not stated in the provided context. Check the package requirements and source to confirm whether its base TestCase integrates with Testbench or assumes a different bootstrap. If it does integrate, you can extend the provided test case and keep Testbench-based package testing conventions.
Should mrgoodbytes8667/test-common be a dev dependency in composer.json?
Yes, testing utilities should normally be required with --dev so they are not installed in production deployments. Add it to the require-dev section of your package's composer.json. If you publish a package that other projects install, keep this dependency out of require so consumers do not inherit your test tooling.
How do I choose between this package and writing my own shared test base class?
Use this package if you want the mrgoodbytes conventions and helpers without maintaining a duplicated base TestCase across repositories. Write your own base class if your suite needs highly specific bootstrap logic or you want no external dev dependency. You can also start with this package and override or extend behavior locally where your project needs differ.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections