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

Ensure the uniqueness of phpunit.xml coverage entries

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.0.3
    • 3.9.13, 3.10.10, 3.11.6, 4.0, 4.1
    • Unit tests
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE
    • Hide
      1. Run the following commands:

        $ php admin/tool/phpunit/cli/util.php --buildcomponentconfigs
        $ cat ./mod/bigbluebuttonbn/phpunit.xml
        

      2. Confirm the <coverage> section contains the following lines only once (non-duplicated):

        <directory suffix=".php">classes</directory>
        <file>lib.php</file>
        

      Show
      Run the following commands: $ php admin/tool/phpunit/cli/util.php --buildcomponentconfigs $ cat ./mod/bigbluebuttonbn/phpunit.xml Confirm the <coverage> section contains the following lines only once (non-duplicated): <directory suffix=".php">classes</directory> <file>lib.php</file>

      This was already reported @ MDL-72701, don't remember if it's a regression of ot or pre-existing.

      When the phpunit.xml files are generated, for coverage purposes the union of some "defaults" and the contents of the coverage.php files are joined.

      But it's possible that some of the entries, say lib.php for example, are both part of the default and part of the coverage.php file.

      When that happens... the phpunit.xml generated file has TWO <file>lib.php</file> entries. Same applies to directories. Both in the include and exclude sections.

      While it doesn't have any negative effect, phpunit coverage seems immune to dupes... it would be nice if we can guarantee the uniqueness of the information in the phpunit.xml generated files.

      Not critical at all (zero impact), but cosmetically interesting IMO. :-D

      Ciao

            pholden Paul Holden
            stronk7 Eloy Lafuente (stronk7)
            Simey Lameze Simey Lameze
            Victor Déniz Falcón Victor Déniz Falcón
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 58 minutes
                1h 58m

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