From: krakjoe Date: Thu, 5 Dec 2013 22:50:26 +0000 (+0000) Subject: cleanup X-Git-Tag: php-5.6.0alpha1~110^2~29^2~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68176830273ec789383f39c2be4a123fb51cdd46;p=php cleanup --- diff --git a/tests/run-tests.php b/tests/run-tests.php index 139ff93994..71f723151a 100644 --- a/tests/run-tests.php +++ b/tests/run-tests.php @@ -1,6 +1,12 @@ array( + '%e', + '%s', + '%S', + '%a', + '%A', + '%w', + '%i', + '%d', + '%x', + '%f', + '%c', + '%t', + '$T' + ), + 'replace' => array( + DIR_SEP, + '[^\r\n]+', + '[^\r\n]*', + '.+', + '.*', + '\s*', + '[+-]?\d+', + '\d+', + '[0-9a-fA-F]+', + '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', + '.', + '\t', + '\t+' + ) + ); /** * Constructs a new Test object given a specilized phpdbginit file @@ -356,35 +398,9 @@ namespace phpdbg\testing { switch ($this->expect) { case TEST::FORMAT: - $this->match[] = str_replace(array( - '%e', - '%s', - '%S', - '%a', - '%A', - '%w', - '%i', - '%d', - '%x', - '%f', - '%c', - '%t', - '$T' - ), array( - '\\' . DIRECTORY_SEPARATOR, - '[^\r\n]+', - '[^\r\n]*', - '.+', - '.*', - '\s*', - '[+-]?\d+', - '\d+', - '[0-9a-fA-F]+', - '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', - '.', - '\t', - '\t+' - ), preg_quote($line)); + $this->match[] = str_replace( + self::$format['search'], + self::$format['replace'], preg_quote($line)); break; default: $this->match[] = $line;