src/package/Data/Repositories/Support/Helpers.php
protected function parseDuskScreenshots($log, $folder)
    {
        preg_match_all('/[0-9]\)+\s(.+::.*)/', $log, $matches, PREG_SET_ORDER);

        $result = [];

        foreach ($matches as $line) {
            $name = str_replace("\r", '', $line[1]);
            $name = str_replace('\\', '_', $name);
            $name = str_replace('::', '_', $name);

            $result[] = $folder.DIRECTORY_SEPARATOR."failure-{$name}-0.png";
        }

        return count($result) == 0 ? null : $result;
    }
protected function parseDuskScreenshots($log, $folder)
    {
        preg_match_all('/[0-9]\)+\s(.+::.*)/', $log, $matches, PREG_SET_ORDER);

        $result = [];

        foreach ($matches as $line) {
            $name = str_replace("\r", '', $line[1]);
            $name = str_replace('\\', '_', $name);
            $name = str_replace('::', '_', $name);

            $result[] = $folder.DIRECTORY_SEPARATOR."failure-{$name}-0.png";
        }

        return count($result) == 0 ? null : $result;
    }
protected function parseDuskScreenshots ( $ log , $ folder ) { preg_match_all ( '/[0-9]\)+\s(.+::.*)/' , $ log , $ matches , PREG_SET_ORDER ) ; $ result = [ ] ; foreach ( $ matches as $ line ) { $ name = str_replace ( "\r" , '' , $ line [ 1 ] ) ; $ name = str_replace ( '\\' , '_' , $ name ) ; $ name = str_replace ( '::' , '_' , $ name ) ; $ result [ ] = $ folder . DIRECTORY_SEPARATOR . "failure-{$name}-0.png" ; } return count ( $ result ) == 0 ? null : $ result ; }
Generate a lista of screenshots.

@param $log
@param $folder

@return array|null
Generate a lista of screenshots .