diff --git a/README.md b/README.md index 8700a7a..65279dd 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,30 @@ return [ You need to tell the bundle what services you want to mock. That could be done with the "`happyr_service_mock`" service tag or by defining a list of service ids: +
+PHP config +
+ +```php +services([ + \App\AcmeApiClient::class + \App\Some\OtherService::class + ]); +}; + +``` + +
+
+Yaml config +
+ ```yaml # config/packages/test/happyr_service_mocking.yaml @@ -47,6 +71,8 @@ happyr_service_mocking: - 'App\Some\OtherService' ``` +
+ ## Usage ```php @@ -109,6 +135,6 @@ the Kernel is rebooted. ## Limitations This trick will not work if you have two different PHP processes, i.e. you are running -your tests with Panther, Selenium etc. +your tests with Panther, Selenium etc. We can also not create a proxy if your service is final.