Annotation of embedaddon/php/ext/openssl/tests/012.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: openssl_seal() error tests
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded("openssl")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7: $data = "openssl_open() test";
! 8: $pub_key = "file://" . dirname(__FILE__) . "/public.key";
! 9: $wrong = "wrong";
! 10:
! 11: openssl_seal($data, $sealed, $ekeys, array($pub_key)); // no output
! 12: openssl_seal($data, $sealed, $ekeys, array($pub_key, $pub_key)); // no output
! 13: openssl_seal($data, $sealed, $ekeys, array($pub_key, $wrong));
! 14: openssl_seal($data, $sealed, $ekeys, $pub_key);
! 15: openssl_seal($data, $sealed, $ekeys, array());
! 16: openssl_seal($data, $sealed, $ekeys, array($wrong));
! 17: ?>
! 18: --EXPECTF--
! 19:
! 20: Warning: openssl_seal(): not a public key (2th member of pubkeys) in %s on line %d
! 21:
! 22: Warning: openssl_seal() expects parameter 4 to be array, string given in %s on line %d
! 23:
! 24: Warning: openssl_seal(): Fourth argument to openssl_seal() must be a non-empty array in %s on line %d
! 25:
! 26: Warning: openssl_seal(): not a public key (1th member of pubkeys) in %s on line %d
! 27:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>