MDL-66973 search: Reset Content writer after test.

This commit is contained in:
Mikhail Golenkov
2019-10-22 09:41:46 +11:00
parent 94bf3e9c78
commit 274ccc948b
2 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ defined('MOODLE_INTERNAL') || die();
use \tool_monitor\privacy\provider;
use \core_privacy\local\request\approved_contextlist;
use \core_privacy\local\request\approved_userlist;
use \core_privacy\tests\provider_testcase;
/**
* Privacy test for the event monitor
@@ -37,7 +38,7 @@ use \core_privacy\local\request\approved_userlist;
* @copyright 2018 Adrian Greeve <adriangreeve.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class tool_monitor_privacy_testcase extends advanced_testcase {
class tool_monitor_privacy_testcase extends provider_testcase {
/**
* Set up method.
@@ -104,6 +104,9 @@ class privacy_model_testcase extends \core_privacy\tests\provider_testcase {
* @return void
*/
public function tearDown() {
// Call parent tearDown() first.
parent::tearDown();
// For unit tests before PHP 7, teardown is called even on skip. So only do our teardown if we did setup.
if ($this->generator) {
// Moodle DML freaks out if we don't teardown the temp table after each run.