Skip to content

Commit

Permalink
Tests/UndoNamespacedNameSingleTokenTest: 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 74501b9 commit ba2a70b
Showing 1 changed file with 138 additions and 138 deletions.
Loading

0 comments on commit ba2a70b

Please sign in to comment.