catalyst / moodle-auth_outage

Planned, graduated user and admin friendly moodle outages
https://moodle.org/plugins/auth_outage
17 stars 33 forks source link

Broken unit tests #213

Closed dmitriim closed 3 years ago

dmitriim commented 3 years ago

Seems like tests are broken after the recent changes.

Would be good to fix travis to make sure that we don't break them again.

.......E

Time: 12.82 minutes, Memory: 354.30 MB

There was 1 error:

1) infopagecontroller_test::test_output Error: Call to undefined method auth_outage\local\outagelib::inject()

/var/www/site/auth/outage/classes/local/controllers/infopage.php:111 /var/www/site/auth/outage/classes/local/controllers/infopage.php:85 /var/www/site/auth/outage/tests/phpunit/local/controllers/infopage_test.php:106 /var/www/site/lib/phpunit/classes/advanced_testcase.php:80

To re-run: vendor/bin/phpunit "infopagecontroller_test" auth/outage/tests/phpunit/local/controllers/infopage_test.php

golenkovm commented 3 years ago

It seems to be a regression of #212 @jamie-catalyst

jamie-catalyst commented 3 years ago

I've created a fix to get the tests running again which fixes any errors being flagged, including the issue highlighted by @dmitriim