MDL-74098 phpunit: Normalise dir separator to match expectations

This commit is contained in:
Eloy Lafuente (stronk7) 2022-03-07 19:09:02 +01:00
parent 967d9b2546
commit abc57c853a

View File

@ -101,7 +101,7 @@ class course_delete_modules_test extends \advanced_testcase {
} catch (\coding_exception $e) {
// Assert exception.
$this->assertInstanceOf(\coding_exception::class, $e);
$errormsg = $e->getMessage();
$errormsg = str_replace('\\', '/', $e->getMessage()); // Normalise dir separator.
$this->assertStringContainsString('cannotdeletemodulemissinglib', $errormsg);
$this->assertStringContainsString('course/lib.php', $errormsg);
$this->assertStringContainsString('mod/TestModuleToDelete/lib.php is missing', $errormsg);