richcongress/unit-bundle
RichCongress UnitBundle is a Symfony/PHPUnit testing helper bundle that simplifies unit and integration test setup with base test cases and convenient container, entity manager, and mocking utilities. It streamlines common testing boilerplate for faster, cleaner Symfony tests.
src/ for the core entry points: CommandTestCase, AbstractCommand, the fixture creation helpers, ConnectionFactory, and the SQLite language extensions. In v1.0.2 the fixture helpers, buildObject, and ConnectionFactory are the most useful places to start.CommandTestCase helper handling and AbstractCommand error handling in one pass.DATE_FORMAT function early. It lets SQLite-backed tests behave closer to MySQL without switching the test database.buildObject to reduce boilerplate before building out larger test suites.CommandTestCase.buildObject across all test types to construct test doubles or domain objects consistently. This is useful when you want the same construction path in unit, feature, and command tests.ConnectionFactory to standardize test database connections, especially when mixing SQLite in-memory tests with connection-specific setup. Keep connection configuration centralized rather than hand-rolling connections per test.DATE_FORMAT function in queries exercised by tests when production uses MySQL. This is a test-parity tool, not a replacement for verifying real MySQL behavior in integration environments.CommandTestCase helper behavior is fixed, but helpers used inside commands may still depend on the command being bootstrapped through the package’s test case. Do not instantiate commands manually if the test relies on helper injection.DATE_FORMAT scope: The new function is added to the SQLite language layer. It will not make SQLite fully MySQL-compatible; use it for date-formatting parity and keep MySQL-specific SQL coverage in a MySQL-backed test job where possible.buildObject consistency: Since buildObject is now available for all tests, standardize on it for object creation where possible. Mixing manual new calls with buildObject can hide container or mocking differences between test types.How can I help you explore Laravel packages today?