You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changed unique traces to exclude suppressed traces so they don't have to be filtered later.
Changed ClassicTheme to emit line break before trace colour block instead of inside.
Renamed CapabilitiesTest::testGigaSlow -> testVerySlow.
Updated Readme.
Copy file name to clipboardExpand all lines: README.md
+16-8Lines changed: 16 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Pip is a [PHPUnit][] extension that immediately prints exceptions and assertion
15
15
## Benefits
16
16
17
17
* Display the name of each test case as it is executed.
18
-
* Display the execution time of each test in tiered colour bands.
18
+
* Display the execution time of each test in configurable, tiered colour bands.
19
19
* Immediately print exceptions, assertion failures, warnings, notice and deprecation messages as they occur.
20
20
* Flawless test suite indicator: success dot turns to red exclamation mark if any prior tests failed. Useful for CI consoles without a scrollback buffer.
21
21
@@ -57,10 +57,10 @@ Pip's behaviour can be customized by adding `<parameter>` nodes as children of t
| perf.slow | 200 (ms) | Sets the performance threshold for _slow_ (yellow) tests |
61
-
| perf.vslow | 1000 (ms) | Sets the performance threshold for _very slow_ (red) tests |
60
+
| perf.slow | 200 (ms) | Sets the performance threshold for _slow_ (yellow) tests. |
61
+
| perf.vslow | 1000 (ms) | Sets the performance threshold for _very slow_ (red) tests. |
62
62
| test.dp.args | true | True to show the arguments passed by the data provider, false to hide. |
63
-
| test.name.strip | '' | Strips the specified matching portion of the test name |
63
+
| test.name.strip | '' | Strips the specified matching portion of the test name. |
64
64
65
65
## Requirements
66
66
@@ -72,13 +72,21 @@ Pip's behaviour can be customized by adding `<parameter>` nodes as children of t
72
72
73
73
## Testing Pip
74
74
75
-
The printer's capabilities are exploited via `CapabilitiesTest`. However, this testfile isn't run directly because many of these tests are designed to fail. Instead, we write tests that run PHPUnit internally, each of which invokes one of the capability test cases and verifies its output.
75
+
To run the full test suite, use the following command.
76
76
77
-
The real tests, also known as *functional tests*, are located in `test/functional`, written in PHPT format. PHPT is a [scarcely documented format](http://qa.php.net/phpt_details.php) designed to support [testing PHP itself](https://qa.php.net/write-test.php). An undocumented feature of PHPUnit is its limited support for a subset of the PHPT test specification, which we exploit to test PHPUnit itself with our printer implementation loaded.
77
+
```sh
78
+
composer test
79
+
```
80
+
81
+
Pip's capabilities are exploited via `CapabilitiesTest`. However, this test file isn't run directly because many of these tests are designed to fail. Instead, we write tests that run PHPUnit internally, each of which invokes one of the capability test cases and verifies its output. To run `CapabilitiesTest`, specify the following command
78
82
79
-
To run the tests, simply specify `vendor/bin/phpunit -c test` on the command line from the project directory. By default, we run all the functional PHPT tests. To run `CapabilitiesTest` instead, specify `vendor/bin/phpunit -c test test/CapabilitiesTest.php`.
83
+
```sh
84
+
composer test test/CapabilitiesTest.php
85
+
```
86
+
87
+
The real tests, also known as *functional tests*, are located in `test/functional`, written in PHPT format. PHPT is a [scarcely documented format](http://qa.php.net/phpt_details.php) designed to support [testing PHP itself](https://qa.php.net/write-test.php). An undocumented feature of PHPUnit is its limited support for a subset of the PHPT test specification, which we exploit to test PHPUnit itself with our printer implementation loaded.
80
88
81
-
### Writing a functional test
89
+
### Writing functional tests
82
90
83
91
To test the output of a particular capability we run `CapabilitiesTest` with the `--filter` option to target a specific test case. Each functional test contains the arguments passed to PHPUnit in the `--ARGS--` section of the file. These arguments can be pasted directly after the PHPUnit command to see the resulting output from that test case. We verify the output in the `--EXPECTF--` section of the file.
Deprecated: Serializable@anonymous implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s%eCapabilitiesTest.php on line %d
17
+
18
+
[33;1mDeprecated: Serializable@anonymous implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s%eCapabilitiesTest.php on line %d
0 commit comments