MDL-67726 tool_phpunit: Removed webrunner tool

This commit is contained in:
Brendan Heywood
2020-02-07 08:08:48 +08:00
committed by Andrew Nicols
parent af3de26941
commit f070dd126f
4 changed files with 6 additions and 204 deletions
+2 -10
View File
@@ -63,7 +63,7 @@ class phpunit_util extends testing_util {
/**
* @var array Files to skip when dropping dataroot folder
*/
protected static $datarootskipondrop = array('.', '..', 'lock', 'webrunner.xml');
protected static $datarootskipondrop = array('.', '..', 'lock');
/**
* Load global $CFG;
@@ -482,7 +482,7 @@ class phpunit_util extends testing_util {
}
/**
* Builds dirroot/phpunit.xml and dataroot/phpunit/webrunner.xml files using defaults from /phpunit.xml.dist
* Builds dirroot/phpunit.xml file using defaults from /phpunit.xml.dist
* @static
* @return bool true means main config file created, false means only dataroot file created
*/
@@ -570,14 +570,6 @@ class phpunit_util extends testing_util {
}
}
// relink - it seems that xml:base does not work in phpunit xml files, remove this nasty hack if you find a way to set xml base for relative refs
$data = str_replace('lib/phpunit/', $CFG->dirroot.DIRECTORY_SEPARATOR.'lib'.DIRECTORY_SEPARATOR.'phpunit'.DIRECTORY_SEPARATOR, $data);
$data = preg_replace('|<directory suffix="_test.php">([^<]+)</directory>|',
'<directory suffix="_test.php">'.$CFG->dirroot.(DIRECTORY_SEPARATOR === '\\' ? '\\\\' : DIRECTORY_SEPARATOR).'$1</directory>',
$data);
file_put_contents("$CFG->dataroot/phpunit/webrunner.xml", $data);
testing_fix_file_permissions("$CFG->dataroot/phpunit/webrunner.xml");
return (bool)$result;
}