MDL-83468 phpunit: Test names are not optional

This commit is contained in:
Andrew Nicols 2024-10-17 21:57:04 +08:00 committed by Sara Arjona
parent 3b1118cfd4
commit 41249b16f3
No known key found for this signature in database
2 changed files with 5 additions and 2 deletions

View File

@ -2008,7 +2008,10 @@ final class courselib_test extends advanced_testcase {
// Create the XML file we want to use.
$course->category = (array)$course->category;
$imstestcase = new imsenterprise_test();
// Note: this is a violation of component communication principles.
// TODO MDL-83789.
$imstestcase = new imsenterprise_test('courselib_imsenterprise_test');
$imstestcase->imsplugin = enrol_get_plugin('imsenterprise');
$imstestcase->set_test_config();
$imstestcase->set_xml_file(false, array($course));

View File

@ -49,7 +49,7 @@ abstract class advanced_testcase extends base_testcase {
*
* @param string $name
*/
final public function __construct(string $name = null) {
final public function __construct(string $name) {
parent::__construct($name);
$this->setBackupGlobals(false);