mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
Merge branch 'MDL-82444' of https://github.com/paulholden/moodle
This commit is contained in:
commit
00376925b2
12
filter/tidy/environment.xml
Normal file
12
filter/tidy/environment.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<COMPATIBILITY_MATRIX>
|
||||
<PLUGIN name="filter_tidy">
|
||||
<PHP_EXTENSIONS>
|
||||
<PHP_EXTENSION name="tidy" level="optional">
|
||||
<FEEDBACK>
|
||||
<ON_CHECK message="tidyextensionrequired" plugin="filter_tidy" />
|
||||
</FEEDBACK>
|
||||
</PHP_EXTENSION>
|
||||
</PHP_EXTENSIONS>
|
||||
</PLUGIN>
|
||||
</COMPATIBILITY_MATRIX>
|
@ -25,3 +25,4 @@
|
||||
|
||||
$string['filtername'] = 'HTML tidy';
|
||||
$string['privacy:metadata'] = 'The HTML tidy plugin does not store any personal data.';
|
||||
$string['tidyextensionrequired'] = 'In order to use this filter, the \'tidy\' PHP extension must be installed';
|
||||
|
@ -26,7 +26,7 @@ use environment_results;
|
||||
* @copyright 2013 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class environment_test extends \advanced_testcase {
|
||||
final class environment_test extends \advanced_testcase {
|
||||
|
||||
/**
|
||||
* Test the environment check status.
|
||||
@ -47,7 +47,7 @@ class environment_test extends \advanced_testcase {
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function environment_provider() {
|
||||
public static function environment_provider(): array {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir.'/environmentlib.php');
|
||||
|
||||
@ -75,6 +75,13 @@ class environment_test extends \advanced_testcase {
|
||||
$this->markTestSkipped('OPCache extension is not necessary for unit testing.');
|
||||
}
|
||||
|
||||
if ($result->part === 'php_extension'
|
||||
&& $result->getPluginName() !== ''
|
||||
&& $result->getLevel() === 'optional'
|
||||
&& $result->getStatus() === false) {
|
||||
$this->markTestSkipped('Optional plugin extension is not necessary for unit testing.');
|
||||
}
|
||||
|
||||
if ($result->part === 'custom_check'
|
||||
&& $result->getLevel() === 'optional'
|
||||
&& $result->getStatus() === false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user