Skip to content

Commit 6383f59

Browse files
committed
minor #7624 Add mention of the SymfonyTestsListener (theofidry, javiereguiluz)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #7624). Discussion ---------- Add mention of the SymfonyTestsListener Follow up of symfony/symfony#21982 (comment). /cc @xabbuh Commits ------- 73dccd7 Fixed the issues reported by reviewers ac8121d Removed an extra blank line 865ae6a Reworded the explanation 9263103 Add mention of the SymfonyTestsListener
2 parents de04468 + 73dccd7 commit 6383f59

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

components/phpunit_bridge.rst

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,24 @@ You can install the component in 2 different ways:
3535

3636
.. include:: /components/require_autoload.rst.inc
3737

38+
If you plan to :ref:`write-assertions-about-deprecations` and use the regular
39+
PHPUnit script (not the modified PHPUnit script provided by Symfony), you have
40+
to register a new `test listener`_ called ``SymfonyTestsListener``:
41+
42+
.. code-block:: xml
43+
44+
<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
45+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
46+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.0/phpunit.xsd"
47+
>
48+
49+
<!-- ... -->
50+
51+
<listeners>
52+
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
53+
</listeners>
54+
</phpunit>
55+
3856
Usage
3957
-----
4058

@@ -94,9 +112,9 @@ message, enclosed with ``/``. For example, with:
94112

95113
.. code-block:: xml
96114
97-
<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
115+
<!-- http://phpunit.de/manual/6.0/en/appendixes.configuration.html -->
98116
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
117+
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/6.0/phpunit.xsd"
100118
>
101119
102120
<!-- ... -->
@@ -133,6 +151,8 @@ completely disable the deprecation helper. This is useful to make use of the
133151
rest of features provided by this component without getting errors or messages
134152
related to deprecations.
135153

154+
.. _write-assertions-about-deprecations:
155+
136156
Write Assertions about Deprecations
137157
-----------------------------------
138158

@@ -401,3 +421,4 @@ If you have installed the bridge through Composer, you can run it by calling e.g
401421
.. _`@-silencing operator`: http://php.net/manual/en/language.operators.errorcontrol.php
402422
.. _`@-silenced`: http://php.net/manual/en/language.operators.errorcontrol.php
403423
.. _`Travis CI`: https://travis-ci.org/
424+
.. _`test listener`: https://phpunit.de/manual/current/en/appendixes.configuration.html#appendixes.configuration.test-listeners

0 commit comments

Comments
 (0)