Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-24905 Unit tests fail
  3. MDL-24914

Lib/navigationlib unit test fails, causes fatal error

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Unit tests
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      Here are some of the test failures:

      Fail: lib/simpletest/testnavigationlib.php / ? settings_navigation_test / ? test___initialise
      Equal expectation fails as [NULL] does not match [String: settingsnav] at [/fs2/www/html/sm449/coremoodle/lib/simpletest/testnavigationlib.php line 532]
      Exception: lib/simpletest/testnavigationlib.php / ? navigation_node_test / ? test___construct
      Unexpected PHP error [Undefined property: stdClass::$admin] severity [E_NOTICE] in [/fs2/www/html/sm449/coremoodle/lib/weblib.php line 343]
      Exception: lib/simpletest/testnavigationlib.php / ? navigation_node_test / ? test___construct
      Unexpected PHP error [Undefined property: stdClass::$debug] severity [E_NOTICE] in [/fs2/www/html/sm449/coremoodle/lib/navigationlib.php line 669]

      However, most important is the fact that it kills all further tests:

      Fatal error: Call to a member function add() on a non-object in /fs2/www/html/sm449/coremoodle/lib/navigationlib.php on line 281
       
      Call Stack:
          0.0004     692480   1. {main}() /fs2/www/html/sm449/coremoodle/admin/report/unittest/index.php:0
          3.1428  147936504   2. autogroup_test_coverage->run() /fs2/www/html/sm449/coremoodle/admin/report/unittest/index.php:94
          3.1428  147936504   3. AutoGroupTest->run() /fs2/www/html/sm449/coremoodle/lib/simpletestcoveragelib.php:144
          3.1428  147936648   4. TestSuite->run() /fs2/www/html/sm449/coremoodle/admin/report/unittest/ex_simple_test.php:37
       1042.4101  168779552   5. TestSuite->run() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/test_case.php:618
       1042.5925  170074296   6. SimpleTestCase->run() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/test_case.php:615
       1042.5930  170077840   7. SimpleExceptionTrappingInvoker->invoke() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/test_case.php:143
       1042.5931  170079184   8. SimpleInvokerDecorator->invoke() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/exceptions.php:43
       1042.5931  170079184   9. SimpleErrorTrappingInvoker->invoke() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/invoker.php:137
       1042.5931  170080584  10. SimpleInvokerDecorator->invoke() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/errors.php:53
       1042.5931  170080584  11. SimpleInvoker->invoke() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/invoker.php:137
       1042.5931  170080632  12. global_navigation_test->setUp() /fs2/www/html/sm449/coremoodle/lib/simpletestlib/invoker.php:67
       1042.5932  170086904  13. navigation_node->add() /fs2/www/html/sm449/coremoodle/lib/simpletest/testnavigationlib.php:307

        Attachments

          Activity

            People

            • Assignee:
              quen Sam Marshall
              Reporter:
              quen Sam Marshall
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: