Skip to content

Commit 8a7bd42

Browse files
committed
Merge branch 'master' into 4.x
2 parents 8820099 + ec277a7 commit 8a7bd42

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ To run the tests specific to the use of `PHP_CODESNIFFER_CBF === true`:
380380

381381
#### Other notes about writing tests
382382

383+
* When using data providers, define them immediately below the corresponding test method.
384+
* 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()`.
383385
* The `Config` class uses a number of static properties and can have a performance impact on the tests too.
384386
To get round both these issues, use the `ConfigDouble` class instead.
385387
Generally speaking, only tests which test the behaviour of the `Config` class itself where it relates to the static properties, should use the real `Config` class for testing.

0 commit comments

Comments
 (0)