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

Behat unit tests fails on Windows

    XMLWordPrintable

    Details

      Description

      Reported by Michael during his windows unit tests:

      tool_behat_testcase::test_config_file_contents
      Failed asserting that 'default:
        paths:
          features: 'D:\xampp\htdocs\master_integration\lib\behat\features'
          bootstrap: 'D:\xampp\htdocs\master_integration\lib\behat\features\bootstrap'
       
        context:
          class: behat_init_context
        extensions:
          Behat\MinkExtension\Extension:
            base_url: 'http://localhost:8000'
            goutte: null
            selenium2: null
          Moodle\BehatExtension\Extension:
            features:
              - feature1
              - feature2
              - feature3
            steps_definitions:
              micarro: /me/lo/robaron
              anoche: /cuando/yo/dormia
      ' contains "features: D:\xampp\htdocs\master_integration/lib/behat/features".
       
      D:\xampp\htdocs\master_integration\admin\tool\behat\tests\tool_behat_test.php:172
      D:\xampp\htdocs\master_integration\lib\phpunit\classes\advanced_testcase.php:76
       
      To re-run:
       \xampp\php\phpunit tool_behat_testcase admin\tool\behat\tests\tool_behat_test.php
      

      The tool_behat_testcase->test_config_file_contents test is failing on Windows because the directory separators are using hardcoded slashes instead of the DIRECTORY_SEPARATOR constant

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmonllao David Monllaó
              Reporter:
              salvetore Michael de Raadt
              Integrator:
              Dan Poltawski
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, 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:
                14/May/13