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

Support autoloading of test classes

XMLWordPrintable

      With MDLSITE-4800 decided now we can start using namespaces within **/tests directories in an organized way

      There are various stuff that can be found there:

      • phpunit test cases.
      • generators.
      • fixtures.
      • behat steps
      • ...

      Given the agreement about namespaces... maybe we should consider to make the proper APIs, so they can be used as level2 namespace (\mod_forum\generator\...).

      Alternative (not needing them being APIs) would be to move the to 3rd level, under local, where we have freedom. (\mod_forum\local\generators)

      And also, there is the already existing "tests" API, so we can use it too (\mod_forum\tests\generator).

      Note it's not mandatory to move all them to namespaces, neither implement their autoloading. But we need to provide/allow the details the agreement defines.

      So this is about consider which alternative we follow and how we provide autoloading for them. Importantly... test cases themselves don't need autoloading (phpunit's finder finds them no matter the namespace).

      Ciao

            dobedobedoh Andrew Lyons
            stronk7 Eloy Lafuente (stronk7)
            Paul Holden Paul Holden
            Simey Lameze Simey Lameze
            CiBoT CiBoT
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours, 53 minutes
                1d 2h 53m

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