Commit 2a44233d authored by catch's avatar catch
Browse files

Issue #3531022 by mondrake: Let run-tests.sh print db type and version in the initial output

(cherry picked from commit fa068be3)
parent 0a8775eb
Loading
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -183,6 +183,14 @@
echo sprintf("PHP Version:      %s\n", \PHP_VERSION);
echo sprintf("PHP Binary:       %s\n", $php ?? getenv('_'));
echo sprintf("PHPUnit Version:  %s\n", Version::id());
if ($args['dburl']) {
  $sut_connection_info = Database::getConnectionInfo();
  $sut_tasks_class = $sut_connection_info['default']['namespace'] . "\\Install\\Tasks";
  $sut_installer = new $sut_tasks_class();
  $sut_connection = Database::getConnection();
  echo sprintf("Database:         %s\n", (string) $sut_installer->name());
  echo sprintf("Database Version: %s\n", $sut_connection->version());
}
echo "-------------------------------\n";
echo "\n";