xref: /PHP-5.3/ext/openssl/tests/002.phpt (revision 56ba1f9e)
1--TEST--
2openssl_seal() tests
3--SKIPIF--
4<?php if (!extension_loaded("openssl")) print "skip"; ?>
5--FILE--
6<?php
7
8$a = 1;
9$b = array(1);
10$c = array(1);
11$d = array(1);
12
13var_dump(openssl_seal($a, $b, $c, $d));
14var_dump(openssl_seal($a, $a, $a, array()));
15var_dump(openssl_seal($c, $c, $c, 1));
16var_dump(openssl_seal($b, $b, $b, ""));
17
18echo "Done\n";
19?>
20--EXPECTF--
21Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on line %d
22bool(false)
23
24Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
25bool(false)
26
27Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
28NULL
29
30Warning: openssl_seal() expects parameter 1 to be string, array given in %s on line %d
31NULL
32Done
33