** No longer affects: mahara/20.04

** No longer affects: mahara/20.10

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask 
on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1888335

Title:
  behat html report logic breaks when behat-html-formatter is
  reinstalled

Status in Mahara:
  Confirmed

Bug description:
  On master branch
  When running behat tests locally, there is an warning message like

  [WAR] f9 (/home/ceciliavg/maharacode/mahara/external/vendor/emuse
  /behat-html-formatter/src/Renderer/Behat2Renderer.php:94) count():
  Parameter must be an array or an object that implements Countable

  To replicate:

  - delete the external/vendor/emuse/behat-html-formatter
  - run "make initcomposer" to reinstall the package
  - run behat for a single feature file, e.g.
    ./test/behat/mahara_behat.sh run institution_smartevidence.feature

  Expected result: the test passes with no warnings or errors
  Actual results: the test passes but we can see many warnings like the one 
above.

  This is happening because we replace the file Behat2Renderer.php with our 
version of it, where we add extra checks before calling count().
  We used to add this every time we run behat, but we later change that to copy 
the file only when creating the html reports.

  But we are actually using that Behat2Renderer file even when we are running 
behat without creating the html report. We would need to check if we can stop 
running this part of the code when we are not creating html reports, as it's 
not actually needed.
  Also we can report the problem to the maintainers of the behat-html-formatter 
and submit the fixed Behat2Renderer.php

  A quick fix for now:
  to stop getting this warning messages, add the html option when running 
behat, like:
  ./test/behat/mahara_behat.sh run institution_smartevidence.feature html

  this will copy the correct file into the package in vendor folder.
  This needs to be done only once.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1888335/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~mahara-contributors
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~mahara-contributors
More help   : https://help.launchpad.net/ListHelp

Reply via email to