MDL-67734 core_xapi: Fix MSSQL PHPUnit failure with duplicated id
authorFerran Recio <ferran@moodle.com>
Thu, 2 Apr 2020 08:27:43 +0000 (10:27 +0200)
committerSara Arjona <sara@moodle.com>
Thu, 2 Apr 2020 08:37:41 +0000 (10:37 +0200)
lib/xapi/tests/helper.php

index b42874f..3ed38cc 100644 (file)
@@ -69,7 +69,7 @@ class test_helper {
 
         $select = "component = :component";
         $params = ['component' => 'core_xapi'];
-        $records = $this->store->get_events_select($select, $params, 'id DESC', 0, 1);
+        $records = $this->store->get_events_select($select, $params, 'timecreated DESC', 0, 1);
 
         if (empty($records)) {
             return null;