matthiasnoback/phpunit-test-service-container
Simple service container for PHPUnit tests
Maintainers
Package info
github.com/matthiasnoback/phpunit-test-service-container
pkg:composer/matthiasnoback/phpunit-test-service-container
Requires
- php: ^7.1 || ^8.0
- phpunit/phpunit: ~6.0||~7.0||~8.0||~9.0||^10.0||^11.0||^12.0
- pimple/pimple: ~3.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT 6c773d41dea1f1e1b0a8f29ffc443fec5be80fe3
- Matthias Noback <matthiasnoback.woop@gmail.com>
This package is auto-updated.
Last update: 2026-05-31 00:21:59 UTC
README
This library provides a simple service container which makes use of service providers. It also provides a base class for your test cases which provides access to such a service container.
The service container extends the Pimple dependency injection container.
Create your own service providers to configure any services you'd like to use in your unit tests.
Read more about using a service container to configure dependencies in unit tests (or integration tests) here: http://php-and-symfony.matthiasnoback.nl/2013/06/phpunit-pimple-integration-tests-with-a-simple-di-container/
