MDL-4188 core_message: Modify PHPUnit to turn off course welcome message

This commit is contained in:
Huong Nguyen 2024-01-30 11:23:09 +07:00
parent 70f85b92e3
commit c4e07686ea
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A

View File

@ -41,10 +41,20 @@ defined('MOODLE_INTERNAL') || die();
*/
class provider_test extends \core_privacy\tests\provider_testcase {
/**
* Setup.
*/
protected function setUp(): void {
parent::setUp();
// Turn off the course welcome message, so we can easily test other messages.
set_config('sendcoursewelcomemessage', 0, 'enrol_manual');
}
/**
* Test for provider::get_metadata().
*/
public function test_get_metadata() {
$this->resetAfterTest();
$collection = new collection('core_message');
$newcollection = provider::get_metadata($collection);
$itemcollection = $newcollection->get_collection();