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

PHPUnit tests of recentlyaccessedcourses failure

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Ideally in a site that currently is failing the test because of the "different" order of records returned...

      0. Init phpunit:

      php admin/tool/phpunit/cli/init.php
      

      1. Verify that this is passing ok: "OK (8 tests, 49 assertions)":

      vendor/bin/phpunit blocks/tests/externallib_test.php
      

      Show
      Ideally in a site that currently is failing the test because of the "different" order of records returned... 0. Init phpunit: php admin/tool/phpunit/cli/init.php 1. Verify that this is passing ok: "OK (8 tests, 49 assertions)": vendor/bin/phpunit blocks/tests/externallib_test.php
    • Affected Branches:
      MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Pull 3.8 Branch:
    • Pull Master Branch:

      Description

      When checking an array, one can never be sure about the order of the elements.

      The code:

      $this->assertEquals('displaycategories', $block['configs'][0]['name']);

      can return 'version' or 'displaycategories'.

       

      core_block_externallib_testcase::test_get_dashboard_blocks_default_dashboard
      Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -'displaycategories'
      +'version'
      blocks/tests/externallib_test.php:270
      lib/phpunit/classes/advanced_testcase.php:80
      
      

       

        Attachments

          Activity

            People

            Assignee:
            stronk7 Eloy Lafuente (stronk7)
            Reporter:
            rdebleu Renaat Debleu
            Integrator:
            Andrew Nicols
            Tester:
            Andrew Nicols
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jul/20

                Time Tracking

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