polishsymfonycommunity/symfony2-mocker-extension
Behat extension for Symfony2 that lets you mock services in the dependency injection container during tests. Built on Mockery and SymfonyMockerContainer. Consider it a hack and use sparingly; alternative: TestDoubleBundle.
TestDoubleBundle or redesigning service dependencies).Adopt When:
TestDoubleBundle or similar).Look Elsewhere If:
TestDoubleBundle or redesign."This package lets our QA team mock Symfony2 services in automated tests faster, reducing manual effort and accelerating feature validation. It’s a short-term fix for legacy systems—like duct tape for a leaky pipe—while we invest in long-term architecture improvements. Low risk (MIT license, open-source), but we’ll phase it out once we modernize the codebase."
*"The Symfony2 Mocker Extension plugs into Behat to mock DI container services, cutting test setup time for integration scenarios. Critical caveats:
TestDoubleBundle or redesign services to avoid container dependencies.
Proposal: Approve for [specific legacy project] with a 6-month sunset clause to migrate to modern testing practices."*How can I help you explore Laravel packages today?