Skip to content

Commit

Permalink
Tests/StableCommentWhitespace[Win]Test: use named data sets
Browse files Browse the repository at this point in the history
With non-named data sets, when a test fails, PHPUnit will display the number of the test which failed.

With tests which have a _lot_ of data sets, this makes it _interesting_ (and time-consuming) to debug those, as one now has to figure out which of the data sets in the data provider corresponds to that number.

Using named data sets makes debugging failing tests more straight forward as PHPUnit will display the data set name instead of the number.
Using named data sets also documents what exactly each data set is testing.

Aside from adding the data set name, this commit also adds the parameter name for each item in the data set, this time in an effort to make it more straight forward to update and add tests as it will be more obvious what each key in the data set signifies.

Includes making the data types in the docblocks more specific.
  • Loading branch information
jrfnl committed Jan 14, 2024
1 parent 6b8e591 commit 2c32a6e
Show file tree
Hide file tree
Showing 2 changed files with 141 additions and 141 deletions.
Loading

0 comments on commit 2c32a6e

Please sign in to comment.