phpunit + mysqli error in moodle 2.4

phpunit + mysqli error in moodle 2.4

by Abhinav Singh -
Number of replies: 1

Hi I run sample phpunit testcase and I am getting this error ...how shall I fix it


<?php

define('CLI_SCRIPT', true);

require_once('../../config.php');


class sampletest extends PHPUnit_FrameWork_TestCase{

    public function test_get_appshortcodes() {

    }

}


Error - 


PHP Warning:  mysqli::close(): Couldn't fetch mysqli in /home/darshan/work/elearn/lib/dml/mysqli_native_moodle_database.php on line 422

PHP Stack trace:

PHP   1. {main}() /usr/bin/phpunit:0

PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46

PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129

PHP   4. moodle_database->__destruct() /home/darshan/work/elearn/lib/dml/moodle_database.php:0

PHP   5. mysqli_native_moodle_database->dispose() /home/darshan/work/elearn/lib/dml/moodle_database.php:146

PHP   6. mysqli->close() /home/hvkj/work/elearn/lib/dml/mysqli_native_moodle_database.php:422





Average of ratings: -