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

Behat: ParserException on features after composer update

XMLWordPrintable

      Following a composer update, there is now 3 "Behat\Gherkin\Exception\ParserException" when running the behat tests.

      Moodle 3.1.2+ (Build: 20160915), 7e218174dd3a22466f4a78af842ec107ddf5a0c1
      Php: 5.6.25, mysqli: 5.6.15, OS: Linux 4.7.3-100.fc23.x86_64 x86_64
      Server OS "Linux", Browser: "firefox"
      Started at 20-09-2016, 22:14
       
                                                                                                                                             
        [Behat\Gherkin\Exception\ParserException]                                                                                            
        Expected Step, but got text: "      | teacher1 | Teacher | 1 | teacher1@example.com" in file: /app/www/stable_31/moodle/report/outl  
        ine/tests/behat/outline.feature 
      

      Moodle 3.1.2+ (Build: 20160915), 7e218174dd3a22466f4a78af842ec107ddf5a0c1
      Php: 5.6.25, mysqli: 5.6.15, OS: Linux 4.7.3-100.fc23.x86_64 x86_64
      Server OS "Linux", Browser: "firefox"
      Started at 20-09-2016, 22:16
       
                                                                                                                                             
        [Behat\Gherkin\Exception\ParserException]                                                                                            
        Expected Step, but got text: "      | Block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt="" in file  
        : /app/www/stable_31/moodle/blocks/tests/behat/configure_block_throughout_site.feature  
      

      Moodle 3.1.2+ (Build: 20160915), 7e218174dd3a22466f4a78af842ec107ddf5a0c1
      Php: 5.6.25, mysqli: 5.6.15, OS: Linux 4.7.3-100.fc23.x86_64 x86_64
      Server OS "Linux", Browser: "firefox"
      Started at 21-09-2016, 02:05
       
                                                                                                                                             
        [Behat\Gherkin\Exception\ParserException]                                                                                            
        Expected Step, but got text: "      | teacher1 | Teacher | 1 | teacher1@example.com" in file: /app/www/stable_31/moodle/report/outl  
        ine/tests/behat/user.feature                                                                                                         
      

      In both case, it is related to the fact that the "|" character is missing at the end of the line. I checked and adding those characters is fixing the problem.

      Note:

      • Maybe there's other ParserException in the whole set of tests. I'll update the issue if I find other errors after fixing those 3.
      • Problem is only happening when using command: php composer.phar update (Not with php composer.phar install --dev) so maybe it is not really a bug but only the wrong command to use.

            gaudreaj Jean-Philippe Gaudreau
            gaudreaj Jean-Philippe Gaudreau
            Rajesh Taneja Rajesh Taneja
            Dan Poltawski Dan Poltawski
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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