]> granicus.if.org Git - php/commitdiff
Missed test for previous commit
authorScott MacVicar <scottmac@php.net>
Mon, 17 Nov 2008 21:54:47 +0000 (21:54 +0000)
committerScott MacVicar <scottmac@php.net>
Mon, 17 Nov 2008 21:54:47 +0000 (21:54 +0000)
ext/openssl/tests/openssl_random_pseudo_bytes.phpt [new file with mode: 0644]

diff --git a/ext/openssl/tests/openssl_random_pseudo_bytes.phpt b/ext/openssl/tests/openssl_random_pseudo_bytes.phpt
new file mode 100644 (file)
index 0000000..ac5a307
--- /dev/null
@@ -0,0 +1,22 @@
+--TEST--
+openssl_random_pseudo_bytes() tests
+--SKIPIF--
+<?php if (!extension_loaded("openssl")) print "skip"; ?>
+--FILE--
+<?php
+for ($i = 0; $i < 10; $i++) {
+       var_dump(bin2hex(openssl_random_pseudo_bytes($i, $strong)));
+}
+
+?>
+--EXPECTF--
+string(0) ""
+string(2) "%s"
+string(4) "%s"
+string(6) "%s"
+string(8) "%s"
+string(10) "%s"
+string(12) "%s"
+string(14) "%s"
+string(16) "%s"
+string(18) "%s"
\ No newline at end of file