From f5ff8acbb0529fd7891c5f0942cc2659d61573bc Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sun, 24 Sep 2006 19:40:28 +0000 Subject: [PATCH] [1.1.1] - Gracefully handle error if test-settings.php is not present - Let test-settings define number of runs. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@451 48356398-32a2-884e-a903-53898d9a118a --- benchmarks/Lexer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/benchmarks/Lexer.php b/benchmarks/Lexer.php index 7769dae0..45b2fcc5 100644 --- a/benchmarks/Lexer.php +++ b/benchmarks/Lexer.php @@ -3,13 +3,14 @@ // emulates inserting a dir called HTMLPurifier into your class dir set_include_path(get_include_path() . PATH_SEPARATOR . '../library/'); -require_once '../test-settings.php'; +@include_once '../test-settings.php'; require_once 'HTMLPurifier/ConfigSchema.php'; require_once 'HTMLPurifier/Config.php'; $LEXERS = array(); -$RUNS = 3; +$RUNS = isset($GLOBALS['HTMLPurifierTest']['Runs']) + ? $GLOBALS['HTMLPurifierTest']['Runs'] : 2; require_once 'HTMLPurifier/Lexer/DirectLex.php'; $LEXERS['DirectLex'] = new HTMLPurifier_Lexer_DirectLex();