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

Oracle Unit tests crash

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Course, Unit tests
    • Labels:

      Description

      This test causes the unit tests under oracle to just exit with no output:

      core_course_management_helper_test::test_action_course_hide_show()

      The assert that crashes phpunit is:

              // Try with an invalid object.                                                                                              
              try {                                                                                                                       
                  \core_course\management\helper::action_course_show(get_course($course->id));                                            
              } catch (PHPUnit_Framework_Error $exception) {                                                                              
                  $this->assertNotEquals(false, strpos($exception->getMessage(), 'must be an instance of course_in_list'));               
              }
      

      This is passing an instance of the wrong class to the function and trying to catch the exception - testing this seems overkill to me and I think it should just be removed.

        Attachments

          Activity

            People

            Assignee:
            damyon Damyon Wiese
            Reporter:
            damyon Damyon Wiese
            Peer reviewer:
            Dan Poltawski
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Eloy Lafuente (stronk7)
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Nov/13