com phpruntests: sample tests for GET, POST and COOKIE sections: phpt-tests/sample_cookie.phpt phpt-tests/sample_get.p hpt phpt-tests/sample_post.phpt
| From: | David Soria Parra | Date: | Mon, 20 Apr 2009 19:49:32 +0000 |
| Subject: | com phpruntests: sample tests for GET, POST and COOKIE sections: phpt-tests/sample_cookie.phpt phpt-tests/sample_get.p hpt phpt-tests/sample_post.phpt | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-66544@lists.php.net to get a copy of this message | ||
Commit: 3f014b8dcaf7b5ac627d5880ed0139afc3deb6e1
Author: Zoe Slattery <zoe@php.net> Mon, 20 Apr 2009 19:49:32 +0000
Parents: b30e93f488d25f2e23453a34abc0f121956d7b5d
Branches: master
Link: http://git.php.net/?p=phpruntests.git;a=commitdiff;h=3f014b8dcaf7b5ac627d5880ed0139afc3deb6e1
Log:
sample tests for GET, POST and COOKIE sections
Changed paths:
A phpt-tests/sample_cookie.phpt
A phpt-tests/sample_get.phpt
A phpt-tests/sample_post.phpt
Diff:
diff --git a/phpt-tests/sample_cookie.phpt b/phpt-tests/sample_cookie.phpt
new file mode 100644
index 0000000..0d7d93a
--- /dev/null
+++ b/phpt-tests/sample_cookie.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Sample COOKIE test
+--COOKIE--
+hello=World;goodbye=MrChips
+--FILE--
+<?php
+var_dump($_COOKIE);
+
+?>
+--EXPECT--
+array(2) {
+ ["hello"]=>
+ string(5) "World"
+ ["goodbye"]=>
+ string(7) "MrChips"
+}
diff --git a/phpt-tests/sample_get.phpt b/phpt-tests/sample_get.phpt
new file mode 100644
index 0000000..e14cc36
--- /dev/null
+++ b/phpt-tests/sample_get.phpt
@@ -0,0 +1,15 @@
+--TEST--
+Try a GET section
+--GET--
+hello=World&goodbye=MrChips
+--FILE--
+<?php
+var_dump($_GET);
+?>
+--EXPECT--
+array(2) {
+ ["hello"]=>
+ string(5) "World"
+ ["goodbye"]=>
+ string(7) "MrChips"
+}
diff --git a/phpt-tests/sample_post.phpt b/phpt-tests/sample_post.phpt
new file mode 100644
index 0000000..5045e1d
--- /dev/null
+++ b/phpt-tests/sample_post.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Sample POST test
+--POST--
+hello=World&goodbye=MrChips
+--FILE--
+<?php
+var_dump($_POST);
+
+?>
+--EXPECT--
+array(2) {
+ ["hello"]=>
+ string(5) "World"
+ ["goodbye"]=>
+ string(7) "MrChips"
+}