From 69b1f336348c7389338215c64bb948c6912c08bd Mon Sep 17 00:00:00 2001 From: Tobias Nyholm Date: Fri, 25 Dec 2020 14:14:48 +0100 Subject: [PATCH] Readme updates (#9) * Readme updates * Added internal annotations --- README.md | 5 +++-- src/Generator/Constructor.php | 2 ++ src/Generator/GeneratorFactory.php | 2 ++ src/Generator/LazyLoadingValueHolderGenerator.php | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a75e59..d57a3d0 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ return [ ## Configure services You need to tell the bundle what services you want to mock. That could be done with -the service tag `happyr_service_mock` or by defining a list of service ids: +the "`happyr_service_mock`" service tag or by defining a list of service ids: ```yaml # config/packages/test/happyr_service_mocking.yaml @@ -51,6 +51,7 @@ happyr_service_mocking: ```php use App\AcmeApiClient; +use App\Some\OtherService; use Happyr\ServiceMocking\ServiceMock; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; @@ -79,7 +80,7 @@ class MyTest extends WebTestCase }); $mock = // create a PHPUnit mock or any other mock you want. - ServiceMock::swap(self::$container->get(MyService::class), $mock); + ServiceMock::swap(self::$container->get(OtherService::class), $mock); // ... self::$client->request(...); diff --git a/src/Generator/Constructor.php b/src/Generator/Constructor.php index c6ed6ed..e308cb8 100644 --- a/src/Generator/Constructor.php +++ b/src/Generator/Constructor.php @@ -21,6 +21,8 @@ /** * The `__construct` implementation for lazy loading proxies. + * + * @interal */ class Constructor extends MethodGenerator { diff --git a/src/Generator/GeneratorFactory.php b/src/Generator/GeneratorFactory.php index bf8d3a3..af15ae1 100644 --- a/src/Generator/GeneratorFactory.php +++ b/src/Generator/GeneratorFactory.php @@ -10,6 +10,8 @@ /** * Factory responsible of producing virtual proxy instances. + * + * @interal */ class GeneratorFactory extends LazyLoadingValueHolderFactory { diff --git a/src/Generator/LazyLoadingValueHolderGenerator.php b/src/Generator/LazyLoadingValueHolderGenerator.php index f3ad9bc..9381fd2 100644 --- a/src/Generator/LazyLoadingValueHolderGenerator.php +++ b/src/Generator/LazyLoadingValueHolderGenerator.php @@ -49,6 +49,8 @@ * This class generates a different constructor. * * {@inheritDoc} + * + * @interal */ class LazyLoadingValueHolderGenerator implements ProxyGeneratorInterface {