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

PHPUnit failures in mod_forum on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 3.4
    • Component/s: Forum, Unit tests
    • Labels:
    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull Master Branch:
      MDL-60659-master

      Description

      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
      

        Attachments

          Activity

            People

            • Assignee:
              jpataleta Jun Pataleta
              Reporter:
              jpataleta Jun Pataleta
              Peer reviewer:
              Mihail Geshoski
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Eloy Lafuente (stronk7)
              Participants:
              Component watchers:
              Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze, Andrew Nicols, Mathew May, 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:
                13/Nov/17