一提到web
安装php: ./configure;make
在当前目录有run-tests.php。
2 环境设置
export TEST_PHP_EXECUTABLE=/usr/local/bin/php
3 样例
$ cd /usr/local/apache2/php-5.3.0alpha1
$ ./run-tests.php xyz/001.phpt
=====================================================================
PHP : /usr/local/bin/php
PHP_SAPI : cli
PHP_VERSION : 5.3.0alpha1
ZEND_VERSION: 2.3.0
PHP_OS : Linux - Linux alitest146 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686
INI actual : /usr/local/apache2/php-5.3.0alpha1
More .INIs :
CWD : /usr/local/apache2/php-5.3.0alpha1
Extra dirs :
VALGRIND : Not used
=====================================================================
Running selected tests.
b user is /usr/local/apache2/php-5.3.0alpha1/xyz/001.phpt Array/usr/local/apache2/php-5.3.0alpha1/xyz/001.phpt is fileTEST 1/1 [xyPASS Simple POST Method test [xyz/001.phpt]
=====================================================================
Number of tests : 1 1
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 0 ( 0.0%) ( 0.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 1 (100.0%) (100.0%)
---------------------------------------------------------------------
Time taken : 0 seconds
=====================================================================
[root@alitest146 /usr/local/apache2/php-5.3.0alpha1]
$ cat xyz/001.phpt
--TEST--
Simple POST Method test
--SKIPIF--
--POST--
a=Hello+World
--FILE--
echo $_POST['a']; ?>
--E
论坛精华帖