Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62962

tool_dataprivacy unit tests have data created in a provider

XMLWordPrintable

      admin/tool/dataprivacy/tests/api_test.php::get_data_requests_provider is creating data in a dataProvider. This is fundamentally wrong and will break things.

      This is seen when calling any phpunit test which does not reset state as a database modification.

      Data providers are run before phpunit starts at all. They must not, in fact can not create data because they are called prior to setUp and any test.

      They must not be used to create data. They are intended to provide a set of data and expected result, not as a test setUp.

            jpataleta Jun Pataleta
            dobedobedoh Andrew Lyons
            Mihail Geshoski Mihail Geshoski
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.