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

phpunit 404 tests may fail when using custom exttests location

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6, 2.7
    • Fix Version/s: 2.6.1
    • Component/s: Unit tests
    • Labels:
    • Testing Instructions:
      Hide

      no need to test anything

      but if you really insist:
      1/ add this to your config: define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://petr.moodle.local/moodle-exttests');
      2/ or install some apache that returns xml tag before doctype on error pages (my latest opensuse does it)
      3/ and checkout https://github.com/moodlehq/moodle-exttests.git into your own server

      Show
      no need to test anything but if you really insist: 1/ add this to your config: define('TEST_EXTERNAL_FILES_HTTP_URL', 'http://petr.moodle.local/moodle-exttests'); 2/ or install some apache that returns xml tag before doctype on error pages (my latest opensuse does it) 3/ and checkout https://github.com/moodlehq/moodle-exttests.git into your own server
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w01_MDL-43510_m27_test404
    • Story Points:
      2
    • Sprint:
      BACKEND Sprint 8

      Description

      the problem is that response may start with xml tag breaking the following assert:

      $this->assertStringStartsWith('<!DOCTYPE', $response->results);
      

      Solution is to remove this test completely because it has very little value...

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            skodak Petr Skoda
            Peer reviewer:
            Andrew Nicols
            Integrator:
            Dan Poltawski
            Tester:
            Jason Fowler
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Jan/14