Skip to content

Commit ad9bcc0

Browse files
rodrigoprimojrfnl
andauthored
Update .github/CONTRIBUTING.md
Co-authored-by: Juliette <[email protected]>
1 parent 3f56ce1 commit ad9bcc0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ To run the tests specific to the use of `PHP_CODESNIFFER_CBF === true`:
384384
In such cases, the `PHP_CodeSniffer\Tests\Core\Config\AbstractRealConfigTestCase` should be used as the base test class.
385385
* Tests for the `Runner` class often can't create their own `Config` object in the tests, so run into the same issue.
386386
Those tests should use the `PHP_CodeSniffer\Tests\Core\Runner\AbstractRunnerTestCase` base class, which will ensure the Config is clean.
387-
* When using data providers, define them immediately below the corresponding test method. 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()`.
387+
* When using data providers, define them immediately below the corresponding test method.
388+
* 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()`.
388389

389390
### Submitting Your Pull Request
390391

0 commit comments

Comments
 (0)