@@ -35,6 +35,28 @@ You can install the component in 2 different ways:
35
35
36
36
.. include :: /components/require_autoload.rst.inc
37
37
38
+
39
+ If you are using the `Modified PHPUnit script `_ (A.K.A. Simple PHPUnit), then no further step is required. If however
40
+ you are using the regular `PHPUnit script `_, then you need to register ``SymfonyTestsListener ``
41
+ (a `PHPUnit test listener `_):
42
+
43
+ .. code-block :: xml
44
+
45
+ <!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
46
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
47
+ xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/6.0/phpunit.xsd"
48
+ >
49
+
50
+ <!-- ... -->
51
+
52
+ <listeners >
53
+ <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
54
+ </listeners >
55
+ </phpunit >
56
+
57
+ .. tip :: 3.1
58
+ Note that this step is mandatory only if you plan to `Write Assertions about Deprecations `_.
59
+
38
60
Usage
39
61
-----
40
62
@@ -94,9 +116,9 @@ message, enclosed with ``/``. For example, with:
94
116
95
117
.. code-block :: xml
96
118
97
- <!-- http://phpunit.de/manual/4.1 /en/appendixes.configuration.html -->
119
+ <!-- http://phpunit.de/manual/6.0 /en/appendixes.configuration.html -->
98
120
<phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
99
- xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/4.1 /phpunit.xsd"
121
+ xsi : noNamespaceSchemaLocation =" http://schema.phpunit.de/6.0 /phpunit.xsd"
100
122
>
101
123
102
124
<!-- ... -->
@@ -155,6 +177,7 @@ times (order matters)::
155
177
@trigger_error('The second argument of the "Bar" method is deprecated.', E_USER_DEPRECATED);
156
178
}
157
179
180
+
158
181
Time-sensitive Tests
159
182
--------------------
160
183
@@ -401,3 +424,5 @@ If you have installed the bridge through Composer, you can run it by calling e.g
401
424
.. _`@-silencing operator` : http://php.net/manual/en/language.operators.errorcontrol.php
402
425
.. _`@-silenced` : http://php.net/manual/en/language.operators.errorcontrol.php
403
426
.. _`Travis CI` : https://travis-ci.org/
427
+ .. _`PHPUnit script` : PHPUnit _
428
+ .. _`PHPUnit test listener` : https://phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.test-listeners
0 commit comments