Skip to content
Permalink
Browse files

MDL-52502 phpunit: Add php, db and os deatils

  • Loading branch information...
rajeshtaneja authored and Rajesh Taneja committed Dec 15, 2015
1 parent aeccf4b commit af2dc48b415ac671efdc5482b6dde54789ab4e4a
Showing with 16 additions and 2 deletions.
  1. +16 −2 lib/testing/classes/util.php
@@ -827,7 +827,7 @@ public static function reset_dataroot() {
* @return string The site info
*/
public static function get_site_info() {
global $CFG;
global $CFG, $DB;
$output = '';
@@ -836,12 +836,26 @@ public static function get_site_info() {
$release = null;
require("$CFG->dirroot/version.php");
$output .= "Moodle $release, $CFG->dbtype";
$output .= "Moodle $release";
if ($hash = self::get_git_hash()) {
$output .= ", $hash";
}
$output .= "\n";
// Add php version.
$phpversion = phpversion();
$output .= "Php: ". $phpversion;
// Add database type and version.
$dbtype = $DB->get_dbvendor();
$dbinfo = $DB->get_server_info();
$dbversion = $dbinfo['version'];
$output .= ", " . ucfirst($dbtype) . ": " . $dbversion;
// OS details.
$osdetails = php_uname('s') . " " . php_uname('r') . " " . php_uname('m');
$output .= ", OS: " . $osdetails . "\n";
return $output;
}

0 comments on commit af2dc48

Please sign in to comment.
You can’t perform that action at this time.