MDL-75614 dml: Unit tests must test something

This commit is contained in:
Andrew Nicols
2022-09-30 16:38:27 +08:00
parent 357ab40ff4
commit 8ca4a0087d
+5 -4
View File
@@ -532,14 +532,15 @@ EOD;
/**
* Just a test log function
*/
public function log() {
public function get_site() {
global $DB;
$DB->get_records_sql('SELECT firstname FROM {user} WHERE firstname = :firstname', ['firstname' => 'JohnDoe']);
return $DB->get_record('course', ['category' => 0]);
}
};
$another->log();
$site = $another->get_site();
$CFG->debugsqltrace = 0;
// No assertions just it should not error.
$this->assertEquals(get_site(), $site);
}
public function test_strtok() {