Uploaded image for project: 'Moodle Community Sites'
  1. Moodle Community Sites
  2. MDLSITE-3823

We should support dataProvider

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Component/s: Coding style
    • Labels:
      None

      Description

      Data Providers are awesome, and we already use them in a few places.
      Tim Hunt introduced me to them, and they have great potential for separating out the test from the data being tested - this makes them much more legible.

      Documentation for them is at https://phpunit.de/manual/current/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers

      All we need is to use the dataProvider tag in the docblock, and we're gravy. Sadly, cibot and friends currently complain about this.

      https://github.com/moodlehq/moodle-local_moodlecheck/pull/23 will address the issue.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: