diff --git a/admin/tool/phpunit/cli/util.php b/admin/tool/phpunit/cli/util.php index 7a792865f18..0ab46c012d9 100644 --- a/admin/tool/phpunit/cli/util.php +++ b/admin/tool/phpunit/cli/util.php @@ -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); diff --git a/lib/phpunit/bootstraplib.php b/lib/phpunit/bootstraplib.php index 82d6c28c2ac..d87c23f2898 100644 --- a/lib/phpunit/bootstraplib.php +++ b/lib/phpunit/bootstraplib.php @@ -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; diff --git a/lib/phpunit/readme.md b/lib/phpunit/readme.md index 4e6f4235e42..0cf0de37bb7 100644 --- a/lib/phpunit/readme.md +++ b/lib/phpunit/readme.md @@ -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