matthiasnoback / phpunit-test-service-container
PHPUnit 测试的简单服务容器
v3.2.1
2020-12-10 18:45 UTC
Requires
- php: ^7.0 || ^8.0
- phpunit/phpunit: ~6.0||~7.0||~8.0||~9.0
- pimple/pimple: ~3.0
This package is auto-updated.
Last update: 2024-09-11 03:00:05 UTC
README
此库提供了一个简单的服务容器,它使用服务提供者。它还提供了一个测试用例的基类,该类提供了对这种服务容器的访问。
服务容器扩展了 Pimple 依赖注入容器。
创建自己的服务提供者以配置您希望在单元测试中使用的服务。
在此处阅读更多有关使用服务容器配置单元测试(或集成测试)中的依赖项的信息: http://php-and-symfony.matthiasnoback.nl/2013/06/phpunit-pimple-integration-tests-with-a-simple-di-container/