Skip to content

Commit

Permalink
Merge branch 'MDL-66163-37' of git://github.com/marinaglancy/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_37_STABLE
  • Loading branch information
andrewnicols committed Jul 17, 2019
2 parents 07b75d5 + ccc7e00 commit 6fad97a
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions mod/forum/tests/privacy_provider_test.php
Expand Up @@ -1470,10 +1470,13 @@ public function test_delete_data_for_user() {
// 5 users * 2 forums * 1 file in each forum
// Original total: 10
// One post with file removed.
$this->assertCount(0, $DB->get_records_select('files', "itemid {$postinsql}", $postinparams));
$componentsql = "component = 'mod_forum' AND ";
$this->assertCount(0, $DB->get_records_select('files',
"{$componentsql} itemid {$postinsql}", $postinparams));

// Files for the other posts should remain.
$this->assertCount(18, $DB->get_records_select('files', "filename <> '.' AND itemid {$otherpostinsql}", $otherpostinparams));
$this->assertCount(18, $DB->get_records_select('files',
"{$componentsql} filename <> '.' AND itemid {$otherpostinsql}", $otherpostinparams));
}

/**
Expand Down Expand Up @@ -1678,11 +1681,14 @@ public function test_delete_data_for_users() {
// 5 users * 2 forums * 1 file in each forum
// Original total: 10
// One post with file removed.
$this->assertCount(0, $DB->get_records_select('files', "itemid {$postinsql}", $postinparams));
$componentsql = "component = 'mod_forum' AND ";
$this->assertCount(0, $DB->get_records_select('files',
"{$componentsql} itemid {$postinsql}", $postinparams));

// Files for the other posts should remain.
$this->assertCount(18,
$DB->get_records_select('files', "filename <> '.' AND itemid {$otherpostinsql}", $otherpostinparams));
$DB->get_records_select('files',
"{$componentsql} filename <> '.' AND itemid {$otherpostinsql}", $otherpostinparams));
}

/**
Expand Down

0 comments on commit 6fad97a

Please sign in to comment.