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

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 2.0
    • Unit tests
    • None
    • MOODLE_20_STABLE

      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

            quen Sam Marshall
            quen Sam Marshall
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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