o365-moodle
o365-moodle copied to clipboard
local_o365: Failing webservice unit tests in Moodle 4.2 MDL-77989
As MDL-77989 has landed Moodle 4.2 there should be no calls /lib/externallib.php
in unit tests unless either @runInSeparateProcess
or @runTestsInSeparateProcesses
are specified.
Stack trace:
#0 /var/www/site/lib/externallib.php(35): require_phpunit_isolation()
#1 /var/www/site/local/o365/tests/webservices_onenoteassignment_test.php(30): require_once('/var/www/site/l...')
#2 /var/www/site/vendor/phpunit/phpunit/src/Util/FileLoader.php(66): include_once('/var/www/site/l...')
#3 /var/www/site/vendor/phpunit/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load('/var/www/site/l...')
#4 /var/www/site/vendor/phpunit/phpunit/src/Framework/TestSuite.php(397): PHPUnit\Util\FileLoader::checkAndLoad('/var/www/site/l...')
#5 /var/www/site/vendor/phpunit/phpunit/src/Framework/TestSuite.php(527): PHPUnit\Framework\TestSuite->addTestFile('/var/www/site/l...')
#6 /var/www/site/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php(67): PHPUnit\Framework\TestSuite->addTestFiles(Array)
#7 /var/www/site/vendor/phpunit/phpunit/src/TextUI/Command.php(391): PHPUnit\TextUI\TestSuiteMapper->map(Object(PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection), '')
#8 /var/www/site/vendor/phpunit/phpunit/src/TextUI/Command.php(112): PHPUnit\TextUI\Command->handleArguments(Array)
#9 /var/www/site/vendor/phpunit/phpunit/src/TextUI/Command.php(97): PHPUnit\TextUI\Command->run(Array, true)
#10 /var/www/site/vendor/phpunit/phpunit/phpunit(98): PHPUnit\TextUI\Command::main()
#11 /var/www/site/vendor/bin/phpunit(122): include('/var/www/site/v...')
#12 {main}
Hi @golenkovm
Thank you for reporting the issue and creating the PR. I have reviewed it and it looks perfect. I have created new PRs based on it for release. They will make the next release.
Regards, Lai
Hi @golenkovm
The changes have been included in the releases from today.
Thank you very much for reporting the issue and providing the solution.
Regards, Lai