Skip to content

Commit

Permalink
Readme updates (#9)
Browse files Browse the repository at this point in the history
* Readme updates

* Added internal annotations
  • Loading branch information
Nyholm authored Dec 25, 2020
1 parent 11f03d7 commit 69b1f33
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;

Expand Down Expand Up @@ -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(...);
Expand Down
2 changes: 2 additions & 0 deletions src/Generator/Constructor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

/**
* The `__construct` implementation for lazy loading proxies.
*
* @interal
*/
class Constructor extends MethodGenerator
{
Expand Down
2 changes: 2 additions & 0 deletions src/Generator/GeneratorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

/**
* Factory responsible of producing virtual proxy instances.
*
* @interal
*/
class GeneratorFactory extends LazyLoadingValueHolderFactory
{
Expand Down
2 changes: 2 additions & 0 deletions src/Generator/LazyLoadingValueHolderGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
* This class generates a different constructor.
*
* {@inheritDoc}
*
* @interal
*/
class LazyLoadingValueHolderGenerator implements ProxyGeneratorInterface
{
Expand Down

0 comments on commit 69b1f33

Please sign in to comment.