File: README

package info (click to toggle)
php3 1%3A3.0.5-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 8,348 kB
  • ctags: 9,086
  • sloc: ansic: 76,362; sh: 2,333; php: 1,329; yacc: 1,148; makefile: 970; perl: 763; cpp: 529; awk: 90; sql: 11
file content (33 lines) | stat: -rw-r--r-- 998 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PHP Regression Tests
=======================

Simply type: testmenu
to run the tests.

You may use the testphp program to write your own regression tests
or to test your scripts.

The format of the .tst files is quite simple.  There are 5 possible
sections.  Test, Post, Get, File and Expect.  The Test section 
contains the description of the test.  The Post section contains any
post data that the script might need.  The Get section contains any
Get data.  Note that both the Post and the Get sections need to have
this data in url-encoded format.  The File section contains the actual
script and the Expect section is the expected output.  Blank lines are
ignored in the expected output.

A simple example which takes one argument through the POST method
and one through the GET and displays these would be:

--TEST--
Simple GET and POST test                                      ...
--POST--
a=Hello
--GET--
b=There
--FILE--
<?php echo "$a $b">
--EXPECT--
Content-type: text/html
Hello There