📄 testconfigphp.pm
字号:
session.hash_bits_per_character = 5url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"[MSSQL]mssql.allow_persistent = Onmssql.max_persistent = -1mssql.max_links = -1mssql.min_error_severity = 10mssql.min_message_severity = 10mssql.compatability_mode = Offmssql.secure_connection = Off[Assertion][Ingres II]ingres.allow_persistent = Oningres.max_persistent = -1ingres.max_links = -1ingres.default_database =ingres.default_user =ingres.default_password =[Verisign Payflow Pro]pfpro.defaulthost = "test-payflow.verisign.com"pfpro.defaultport = 443pfpro.defaulttimeout = 30[Sockets]sockets.use_system_read = On[com][mbstring][FrontBase][exif][Tidy]tidy.clean_output = Off[soap]soap.wsdl_cache_enabled=1soap.wsdl_cache_dir="/tmp"soap.wsdl_cache_ttl=86400END_OF_FILE/*******************************************************************\* PROJECT INFORMATION ** ** Project: Apache-Test ** URL: http://httpd.apache.org/test/ ** Notice: Copyright (c) 2004 The Apache Software Foundation ** *********************************************************************** LICENSE INFORMATION ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the ** License. You may obtain a copy of the License at: ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an "AS ** IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ** express or implied. See the License for the specific language ** governing permissions and limitations under the License. ** *********************************************************************** MODULE INFORMATION ** ** This is a PHP implementation of Test::More: ** ** http://search.cpan.org/dist/Test-Simple/lib/Test/More.pm ** *********************************************************************** CREDITS ** ** Originally inspired by work from Andy Lester. Written and ** maintained by Chris Shiflett. For contact information, see: ** ** http://shiflett.org/contact ** *\*******************************************************************/header('Content-Type: text/plain');register_shutdown_function('_test_end');$_no_plan = false;$_num_failures = 0;$_num_skips = 0;$_test_num = 0;function plan($plan){ # plan('no_plan'); # plan('skip_all'); # plan(array('skip_all' => 'My reason is...')); # plan(23); global $_no_plan; global $_skip_all; global $_skip_reason; switch ($plan) { case 'no_plan': $_no_plan = true; break; case 'skip_all': echo "1..0\n"; exit; break; default: if (is_array($plan)) { echo "1..0 # Skip {$plan['skip_all']}\n"; exit; } echo "1..$plan\n"; break; }}function ok($pass, $test_name = ''){ global $_test_num; global $_num_failures; global $_num_skips; $_test_num++; if ($_num_skips) { $_num_skips--; return true; } if (!empty($test_name)) { $test_name = "- $test_name"; } if ($pass) { echo "ok $_test_num $test_name\n"; } else { echo "not ok $_test_num $test_name\n"; $_num_failures++; $caller = debug_backtrace(); if (strstr($caller['0']['file'], $_SERVER['PHP_SELF'])) { $file = $caller['0']['file']; $line = $caller['0']['line']; } else { $file = $caller['1']['file']; $line = $caller['1']['line']; } $file = str_replace($_SERVER['SERVER_ROOT'], 't', $file); diag(" Failed test ($file at line $line)"); } return $pass;}function is($this, $that, $test_name = ''){ $pass = ($this == $that); ok($pass, $test_name); if (!$pass) { diag(" got: '$this'"); diag(" expected: '$that'"); } return $pass;}function isnt($this, $that, $test_name = ''){ $pass = ($this != $that); ok($pass, $test_name); if (!$pass) { diag(" '$this'"); diag(" !="); diag(" '$that'"); } return $pass;}function like($string, $regex, $test_name = ''){ $pass = preg_match($regex, $string); ok($pass, $test_name); if (!$pass) { diag(" '$string'"); diag(" doesn't match '$regex'"); } return $pass;}function unlike($string, $regex, $test_name = ''){ $pass = !preg_match($regex, $string); ok($pass, $test_name); if (!$pass) { diag(" '$string'"); diag(" matches '$regex'"); } return $pass;}function cmp_ok($this, $operator, $that, $test_name = ''){ eval('$pass = ($this ' . $operator . ' $that);'); ok($pass, $test_name); if (!$pass) { diag(" got: '$this'"); diag(" expected: '$that'"); } return $pass;}function can_ok($object, $methods){ $pass = true; $errors = array(); foreach ($methods as $method) { if (!method_exists($object, $method)) { $pass = false; $errors[] = " method_exists(\$object, $method) failed"; } } if ($pass) { ok(true, "method_exists(\$object, ...)"); } else { ok(false, "method_exists(\$object, ...)"); diag($errors); } return $pass;}function isa_ok($object, $expected_class, $object_name = 'The object'){ $got_class = get_class($object); if (version_compare(php_version(), '5', '>=')) { $pass = ($got_class == $expected_class); } else { $pass = ($got_class == strtolower($expected_class)); } if ($pass) { ok(true, "$object_name isa $expected_class"); } else { ok(false, "$object_name isn't a '$expected_class' it's a '$got_class'"); } return $pass;}function pass($test_name = ''){ return ok(true, $test_name);}function fail($test_name = ''){ return ok(false, $test_name);}function diag($message){ if (is_array($message)) { foreach($message as $current) { echo "# $current\n"; } } else { echo "# $message\n"; }}function include_ok($module){ $pass = ((include $module) == 'OK'); return ok($pass);}function require_ok($module){ $pass = ((require $module) == 'OK'); return ok($pass);} function skip($message, $num){ global $_num_skips; if ($num < 0) { $num = 0; } for ($i = 0; $i < $num; $i++) { # FIXME: The pound sign should replace the hyphen pass("# SKIP $message"); } $_num_skips = $num;}# function todo()# {# }# function todo_skip()# {# }# function is_deeply()# {# }# function eq_array()# {# }# function eq_hash()# {# }# function eq_set()# {# }function _test_end(){ global $_no_plan; global $_num_failures; global $_test_num; if ($_no_plan) { echo "1..$_test_num\n"; } if ($_num_failures) { diag("Looks like you failed $_num_failures tests of $_test_num."); }}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -