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

PHPUnit failures in mod_forum on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.4
    • 3.4
    • Forum, Unit tests
    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • MDL-60659-master
    • Hide
      1. Run PHPUnit test for mod/forum/tests/mail_test.php on both Windows and Linux.

        vendor/bin/phpunit mod/forum/tests/mail_test.php
        

        • Confirm the test passes and that you don't encounter any error.
      Show
      Run PHPUnit test for mod/forum/tests/mail_test.php on both Windows and Linux. vendor/bin/phpunit mod/forum/tests/mail_test.php Confirm the test passes and that you don't encounter any error.

      Found the following failures while running PHPUnit on Windows on master. The failures don't occur in 33 (and probably below):

      3) mod_forum_mail_testcase::test_forum_post_email_templates with data set "Text mail without ampersands, quotes or lt/gt" (array(array('Love', 'Moodle', 0, 0), array('101', 'Moodle 101'), array(array('Moodle Forum', array(array('Hello Moodle', 'Welcome to Moodle', '0', array(array('example.txt', 'Basic information about the course')))))), array(array('.*101.*Hello', array('~{$a', '~&(amp|lt|gt|quot|\#039);(?!course)', 'Attachment example.txt:\nhttp....txt\n', 'Hello Moodle', 'Moodle Forum', 'Welcome.*Moodle', 'Love Moodle', '1\d1')))))
      Failed asserting that '
      101 -> Forums -> Moodle Forum -> Hello Moodle 
      https://www.example.com/moodle/mod/forum/discuss.php?d=1#p1
      Hello Moodle
      by Love Moodle - Wednesday, 1 November 2017, 8:13 PM
      ---------------------------------------------------------------------
      Welcome to Moodle
       
      Attachment example.txt:
      https://www.example.com/moodle/pluginfile.php/16/mod_forum/attachment/1/example.txt
       
      ---------------------------------------------------------------------
      This is a copy of a message posted in 101.
       
      To reply click on this link:
      https://www.example.com/moodle/mod/forum/post.php?reply=1
      Change your forum digest preferences:
      https://www.example.com/moodle/mod/forum/index.php?id=2
      ' matches PCRE pattern "#Attachment example.txt:\nhttps://www.example.com/moodle/pluginfile.php/\d*/mod_forum/attachment/\d*/example.txt\n#m".
       
      C:\inetpub\wwwroot\integration_master\mod\forum\tests\mail_test.php:1170
      C:\inetpub\wwwroot\integration_master\lib\phpunit\classes\advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit mod_forum_mail_testcase mod/forum/tests/mail_test.php
       
      4) mod_forum_mail_testcase::test_forum_post_email_templates with data set "Text mail with text+image message i.e. @@PLUGINFILE@@ token handling" (array(array('Love', 'Moodle', 0, 0), array('101', 'Moodle 101'), array(array('Moodle Forum', array(array('Text and image', 'Welcome to Moodle, @@PLUGINFI....png !', '0', array(array('example.txt', 'Basic information about the course')))))), array(array('.*101.*Text and image', array('~{$a', '~&(amp|lt|gt|quot|\#039);(?!course)', 'Attachment example.txt:\nhttp....txt\n', 'Text and image', 'Moodle Forum', 'Welcome to Moodle, *\n.*https...*\n.*!', 'Love Moodle', '1\d1')))))
      Failed asserting that '
      101 -> Forums -> Moodle Forum -> Text and image 
      https://www.example.com/moodle/mod/forum/discuss.php?d=1#p1
      Text and image
      by Love Moodle - Wednesday, 1 November 2017, 8:13 PM
      ---------------------------------------------------------------------
      Welcome to Moodle,
      https://www.example.com/moodle/pluginfile.php/16/mod_forum/post/1/Screen%20Shot%202016-03-22%20at%205.54.36%20AM%20%281%29.png
      !
       
      Attachment example.txt:
      https://www.example.com/moodle/pluginfile.php/16/mod_forum/attachment/1/example.txt
       
      ---------------------------------------------------------------------
      This is a copy of a message posted in 101.
       
      To reply click on this link:
      https://www.example.com/moodle/mod/forum/post.php?reply=1
      Change your forum digest preferences:
      https://www.example.com/moodle/mod/forum/index.php?id=2
      ' matches PCRE pattern "#Attachment example.txt:\nhttps://www.example.com/moodle/pluginfile.php/\d*/mod_forum/attachment/\d*/example.txt\n#m".
       
      C:\inetpub\wwwroot\integration_master\mod\forum\tests\mail_test.php:1170
      C:\inetpub\wwwroot\integration_master\lib\phpunit\classes\advanced_testcase.php:80
       
      To re-run:
       vendor/bin/phpunit mod_forum_mail_testcase mod/forum/tests/mail_test.php
      

            jpataleta Jun Pataleta
            jpataleta Jun Pataleta
            Mihail Geshoski Mihail Geshoski
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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