Skip to content

Commit

Permalink
MDL-75614 dml: Unit tests must test something
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Sep 30, 2022
1 parent 357ab40 commit 8ca4a00
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/dml/tests/dml_test.php
Expand Up @@ -532,14 +532,15 @@ public function test_sql_debugging_anon_class() {
/**
* 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() {
Expand Down

0 comments on commit 8ca4a00

Please sign in to comment.