mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
MDL-32323 always verify that database PHPUnit extension is available
This commit is contained in:
parent
c691274bf9
commit
4e5ff72ea7
@ -76,6 +76,10 @@ if (!@include_once('PHPUnit/Autoload.php')) {
|
||||
phpunit_bootstrap_error(130);
|
||||
}
|
||||
|
||||
if (!@include_once('PHPUnit/Extensions/Database/Autoload.php')) {
|
||||
phpunit_bootstrap_error(130);
|
||||
}
|
||||
|
||||
if ($options['run']) {
|
||||
unset($options);
|
||||
unset($unrecognized);
|
||||
|
@ -43,7 +43,7 @@ function phpunit_bootstrap_error($errorcode, $text = '') {
|
||||
$text = 'Moodle requires PHPUnit 3.6.x, '.$text.' is not compatible';
|
||||
break;
|
||||
case 130:
|
||||
$text = 'Moodle can not find PHPUnit PEAR library';
|
||||
$text = 'Moodle can not find PHPUnit PEAR library or necessary PHPUnit extension';
|
||||
break;
|
||||
case 131:
|
||||
$text = 'Moodle configuration problem: '.$text;
|
||||
|
@ -11,7 +11,7 @@ Documentation
|
||||
Installation
|
||||
------------
|
||||
1. install PEAR package manager - see [PEAR Manual](http://pear.php.net/manual/en/installation.php)
|
||||
2. install PHPUnit package - see [PHPUnit installation documentation](http://www.phpunit.de/manual/current/en/installation.html)
|
||||
2. install PHPUnit package and phpunit/DbUnit extension - see [PHPUnit installation documentation](http://www.phpunit.de/manual/current/en/installation.html)
|
||||
3. edit main config.php - add `$CFG->phpunit_prefix` and `$CFG->phpunit_dataroot` - see config-dist.php
|
||||
4. execute `admin/tool/phpunit/cli/init.sh` to initialise the test environemnt, repeat it after every upgrade or installation of plugins
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user