MDL-81581 phpunit: Create the normalise_line_endings() method
And apply it to all the obvious places related with the issue. Note that surely there are way more in code base, but it's out of scope for this issue.
This commit is contained in:
@@ -990,6 +990,16 @@ class phpunit_util extends testing_util {
|
||||
return str_repeat(" ", $level * 2) . "{$string}\n";
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalise any text to always use unix line endings (line-feeds).
|
||||
*
|
||||
* @param string $text The text to normalize
|
||||
* @return string
|
||||
*/
|
||||
public static function normalise_line_endings(string $text): string {
|
||||
return str_replace(["\r\n", "\r"], "\n", $text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the coverage config for the supplied includelist and excludelist configuration.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user