mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-44111_master' of git://github.com/dmonllao/moodle
This commit is contained in:
commit
8c3966773b
@ -358,7 +358,7 @@ class behat_hooks extends behat_base {
|
||||
* This is used for content such as the DOM, and screenshots.
|
||||
*
|
||||
* @param StepEvent $event
|
||||
* @param String $filetype The file suffix to use.
|
||||
* @param String $filetype The file suffix to use. Limited to 4 chars.
|
||||
*/
|
||||
protected function get_faildump_filename(StepEvent $event, $filetype) {
|
||||
global $CFG;
|
||||
@ -381,7 +381,11 @@ class behat_hooks extends behat_base {
|
||||
// The scenario title + the failed step text.
|
||||
// We want a i-am-the-scenario-title_i-am-the-failed-step.$filetype format.
|
||||
$filename = $event->getStep()->getParent()->getTitle() . '_' . $event->getStep()->getText();
|
||||
$filename = preg_replace('/([^a-zA-Z0-9\_]+)/', '-', $filename) . '.' . $filetype;
|
||||
$filename = preg_replace('/([^a-zA-Z0-9\_]+)/', '-', $filename);
|
||||
|
||||
// File name limited to 256 characters. Leaving 4 chars for the file
|
||||
// extension as we allow .png for images and .html for DOM contents.
|
||||
$filename = substr($filename, 0, 251) . '.' . $filetype;
|
||||
|
||||
return array($dir, $filename);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user