@@ -37,10 +37,16 @@ You can install the component in 2 different ways:
37
37
Usage
38
38
-----
39
39
40
- Once the component is installed, it automatically registers a
41
- `PHPUnit event listener `_ which in turn registers a `PHP error handler `_
42
- called :class: `Symfony\\ Bridge\\ PhpUnit\\ DeprecationErrorHandler `. After
43
- running your PHPUnit tests, you will get a report similar to this one:
40
+ Once the component is installed, a ``simple-phpunit `` script is created in the
41
+ ``vendor/ `` directory to run tests. This script wraps the original PHPUnit binary
42
+ to provide more features:
43
+
44
+ .. code-block :: terminal
45
+
46
+ $ cd my-project/
47
+ $ ./vendor/bin/simple-phpunit
48
+
49
+ After running your PHPUnit tests, you will get a report similar to this one:
44
50
45
51
.. image :: /_images/components/phpunit_bridge/report.png
46
52
@@ -57,6 +63,21 @@ The summary includes:
57
63
Deprecation notices are all other (non-legacy) notices, grouped by message,
58
64
test class and method.
59
65
66
+ .. note ::
67
+
68
+ If you don't want to use the ``simple-phpunit `` script, register the following
69
+ `PHPUnit event listener `_ in your PHPUnit configuration file to get the same
70
+ report about deprecations (which is created by a `PHP error handler `_
71
+ called :class: `Symfony\\ Bridge\\ PhpUnit\\ DeprecationErrorHandler `):
72
+
73
+ .. code-block :: xml
74
+
75
+ <!-- phpunit.xml.dist -->
76
+ <!-- ... -->
77
+ <listeners >
78
+ <listener class =" Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
79
+ </listeners >
80
+
60
81
Trigger Deprecation Notices
61
82
---------------------------
62
83
0 commit comments