- How do I install fintem/unit-test-case in a Laravel project?
- Install it as a development dependency with composer require --dev fintem/unit-test-case. Then extend its base TestCase from your package or application unit tests where the helpers fit. Keep it out of production dependencies because it is a testing utility.
- Does fintem/unit-test-case support Laravel 11 and PHP 8.2?
- Modern Laravel, PHP, and PHPUnit compatibility is not established by the provided context. The release 2.2 change improves the maintenance signal but does not prove support for PHPUnit 10+, Pest, parallel testing, or PHP 8.2+. Check the package composer.json constraints and run a controlled trial before adopting it on a current stack.
- Is fintem/unit-test-case compatible with Pest?
- The package is described as working alongside Pest and standard PHPUnit suites. Pest projects can often use PHPUnit-compatible base classes, but you should verify behavior with your Pest version and test bootstrap. Run a small trial suite before replacing existing test conventions.
- What changed in fintem/unit-test-case version 2.2?
- Version 2.2 appears to tighten test behavior by throwing an exception when mock constructor arguments do not exist. That is a test-support change rather than an application architecture change, but it can make previously permissive mock setups fail in CI. Review the diff and run your full test matrix before upgrading.
- Is fintem/unit-test-case a production dependency?
- No. It is a development-time testing utility intended for tests and CI, not runtime request handling, persistence, or service orchestration. Install it with --dev and avoid shipping it as part of production application behavior. Its risk is primarily engineering and CI risk, not production runtime risk.
- Does fintem/unit-test-case bootstrap the full Laravel application?
- It is designed for isolated unit tests and helps avoid unnecessary application bootstrapping. It can provide optional Laravel container access when tests require it, but it is not meant to replace full application testing where framework bootstrapping is required. Use Laravel's built-in TestCase or package testing tools for feature and integration tests.
- What are alternatives to fintem/unit-test-case for Laravel package testing?
- Common alternatives include Laravel's built-in TestCase, plain PHPUnit TestCase classes, Pest conventions, and Orchestra Testbench for package integration testing. For small helper behavior, an internal tests/Support base class or app-specific TestCase may be safer than adding a long-lived external dependency. Modern Laravel applications should generally prefer built-in conventions unless the package provides clear value.
- Is fintem/unit-test-case actively maintained?
- The 2.2 release means the package has had activity beyond its earlier history, but a single release note does not establish sustained maintenance. Community validation appears thin, and there is no clear security-response or compatibility-patching commitment in the provided context. Inspect the source, pin versions, and decide who owns patching before relying on it.
- How do I migrate away from fintem/unit-test-case?
- If the useful behavior is small, vendor the minimal helper code into an internal test support namespace or tests/Support while preserving the license. Add local tests and fold the behavior into your application's own TestCase. If you are already using the package, pin the previous version, review the 2.2 diff, run the full CI matrix, and then decide whether to remove the dependency.
- Why are my tests failing at mock setup after upgrading to 2.2?
- Version 2.2 appears to throw an exception when mock constructor arguments do not exist, so failures may move from assertion time to mock setup time. Check tests that construct mocks with missing or dynamically generated constructor arguments and compare them with current PHPUnit mock APIs. If the stricter behavior is not worth the upgrade work, pin the previous version while you evaluate an internal replacement.