Skip to content

Commit e71ab2f

Browse files
authored
Update README with more info
1 parent f99a180 commit e71ab2f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ class SomeBundle extends Bundle
114114
This compiler pass will throw an exception. The message of this exception will contain a list
115115
of invalid service definitions.
116116

117-
### Running the validator in phpunit
118-
In Symfony, adding the compiler pass will validate your services each time the page is loaded in your browser or when you use a command. But what if you want to run the validator on demand using PHPUnit? To do this, first set up the compiler pass as explained above and then create a new phpunit test with this inside:
117+
### Running the validator in PHPUnit
118+
In Symfony, adding the compiler pass will validate your services each time the page is loaded in your browser or when you use a command. But what if you want to run the validator on demand using PHPUnit? To do this, first set up the compiler pass as explained above and then create a new PHPUnit test with this inside:
119119
```php
120120
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
121121

@@ -133,7 +133,9 @@ class ContainerServiceDefinitionsTest extends WebTestCase
133133
}
134134
```
135135

136-
This simple functional test just boots up the symfony kernel using the "test" environment. If you look back to the code you added to set up the compiler pass you'll see that we enabled the validator for the "test" environment too. So this simple phpunit test will validate the services each time it is run.
136+
This simple functional test just boots up the symfony kernel using the "test" environment. If you look back to the code you added to set up the compiler pass you'll see that we enabled the validator for the "test" environment too. So this simple PHPUnit test will validate the services each time it is run.
137+
138+
In fact, if you already have functional tests you don't need this test, since the kernel will be booted (and therefore the services will be validated) in the other functional tests. The example test above is only needed if you don't already have any Symfony functional tests of your application.
137139

138140
### Configure the validator
139141

0 commit comments

Comments
 (0)