diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0777be..e624585 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,13 +13,13 @@ jobs: database: 'pgsql' - php: '8.0' moodle-branch: 'MOODLE_403_STABLE' - database: 'pgsql' + database: 'mariadb' - php: '8.1' moodle-branch: 'MOODLE_402_STABLE' database: 'pgsql' - php: '8.0' moodle-branch: 'MOODLE_401_STABLE' - database: 'pgsql' + database: 'mariadb' services: postgres: diff --git a/tests/behat/behat_report_customsql.php b/tests/behat/behat_report_customsql.php index 5d491cc..56b124a 100644 --- a/tests/behat/behat_report_customsql.php +++ b/tests/behat/behat_report_customsql.php @@ -78,6 +78,11 @@ public function the_following_custom_sql_report_exists(TableNode $data) { throw new Exception('The report SQL must be given as querysql.'); } + // Fix test queries containing CHR for MySQL & chums. + if ($DB->get_dbfamily() == 'mysql' && stripos($report['querysql'], 'CHR') !== false) { + $report['querysql'] = str_ireplace('CHR', 'CHAR', $report['querysql']); + } + // Category. if (isset($report['category'])) { $report['categoryid'] = $this->get_category_id_by_name($report['category']);