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
#### Other notes about writing unit/integration tests
380
381
381
382
* The `Config` class uses a number of static properties and can have a performance impact on the tests too.
382
383
To get round both these issues, use the `ConfigDouble` class instead.
@@ -387,6 +388,24 @@ To run the tests specific to the use of `PHP_CODESNIFFER_CBF === true`:
387
388
* When using data providers, define them immediately below the corresponding test method.
388
389
* When a test method has only one data provider, it is considered best practice to closely couple the test and data provider methods via their names. I.e. the data provider's name should match the test method name, replacing the "test" prefix with "data". For example, the data provider for a method named `testSomething()` should be `dataSomething()`.
389
390
391
+
392
+
### Writing End-to-End Tests
393
+
394
+
Bash-based end-to-end tests can be written using the [Bashunit](https://bashunit.typeddevs.com/) test tooling.
395
+
396
+
To install bashunit, follow the [installation guide](https://bashunit.typeddevs.com/installation).
397
+
398
+
You can then run the bashunit tests on Linux/Mac/WSL, like so:
399
+
```bash
400
+
./lib/bashunit -p tests/EndToEnd
401
+
```
402
+
403
+
> Note: these tests will not run in the Windows native CMD shell. When on Windows, either use WSL or use the "git bash" shell.
404
+
405
+
When writing end-to-end tests, please use fixtures for the "files under scan" to make the tests stable.
406
+
These fixtures can be placed in the `tests/EndToEnd/Fixtures` subdirectory.
407
+
408
+
390
409
### Submitting Your Pull Request
391
410
392
411
Some guidelines for submitting pull requests (PRs) and improving the chance that your PR will be merged:
0 commit comments