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

Create default block generator for testing

    XMLWordPrintable

Details

    Description

      At the moment, there are many blocks that are missing a testing generator and trying to create them in a Behat test throws the following error:

      Component block_XXXX does not support generators yet. Missing tests/generator/lib.php

      However, if you try to implement the generator you will find that you only need to extend the testing_block_generator class without implementing any method or adding anything that couldn't be inferred automatically.

      Keeping that in mind, we could provide a default generator for blocks that don't define their own. If any block still needs specific functionality, we can always implement a specific generator to replace the defaults.

      Attachments

        Activity

          People

            noeldemartin Noel De Martin
            noeldemartin Noel De Martin
            Juan Leyva Juan Leyva
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              17/Jan/22

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 11 minutes
                2h 11m