summaryrefslogtreecommitdiff
path: root/ext/session/tests/session_encode_variation7.phpt
diff options
context:
space:
mode:
authorAnt Phillips <ant@php.net>2008-04-29 08:57:12 +0000
committerAnt Phillips <ant@php.net>2008-04-29 08:57:12 +0000
commit2d2ad8e8d3d6332c8746ac66dc5c9fb369cc5dba (patch)
tree115e8dda35dc9a498c59339d6510904aeb335273 /ext/session/tests/session_encode_variation7.phpt
parentf2c9167ebb836c0957cf6e170773ab1b1350bcfb (diff)
downloadphp-git-2d2ad8e8d3d6332c8746ac66dc5c9fb369cc5dba.tar.gz
More session tests to improve code coverage for untested extension code
Diffstat (limited to 'ext/session/tests/session_encode_variation7.phpt')
-rw-r--r--ext/session/tests/session_encode_variation7.phpt35
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/session/tests/session_encode_variation7.phpt b/ext/session/tests/session_encode_variation7.phpt
new file mode 100644
index 0000000000..b3de3c68a8
--- /dev/null
+++ b/ext/session/tests/session_encode_variation7.phpt
@@ -0,0 +1,35 @@
+--TEST--
+Test session_encode() function : variation
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.serialize_handler=php_binary
+--FILE--
+<?php
+
+ob_start();
+
+/*
+ * Prototype : string session_encode(void)
+ * Description : Encodes the current session data as a string
+ * Source code : ext/session/session.c
+ */
+
+echo "*** Testing session_encode() : variation ***\n";
+
+var_dump(session_start());
+$_SESSION["foo"] = 1234567890;
+$encoded = session_encode();
+var_dump(base64_encode($encoded));
+var_dump(session_destroy());
+
+echo "Done";
+ob_end_flush();
+?>
+--EXPECTF--
+*** Testing session_encode() : variation ***
+bool(true)
+string(24) "A2Zvb2k6MTIzNDU2Nzg5MDs="
+bool(true)
+Done
+