Skip to content

Commit 84ada52

Browse files
committed
Fixed documentation, described support for PrependExtensionInterface invocation
1 parent 2d7f81a commit 84ada52

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,26 @@ class MyExtensionTest extends AbstractExtensionTestCase
102102
To prevent duplication of required configuration values, you can provide some minimal configuration, by overriding
103103
the ``getMinimalConfiguration()`` method of the test case.
104104

105+
If your extension implements `Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface`, you may test
106+
its effect on execution by passing ``true`` as a second parameter to ``load()`` method.
107+
108+
```php
109+
<?php
110+
111+
class MyExtensionTest extends AbstractExtensionTestCase
112+
{
113+
/**
114+
* @test
115+
*/
116+
public function after_loading_the_correct_parameter_has_been_set()
117+
{
118+
$this->load(array(), true);
119+
120+
...
121+
}
122+
}
123+
```
124+
105125
## Testing a compiler pass
106126

107127
To test a compiler pass, create a test class and extend from

0 commit comments

Comments
 (0)