php-gnupg/tests/gnupg_res_listsignatures.phpt

34 lines
980 B
Text
Raw Normal View History

--TEST--
2006-05-18 19:32:32 +00:00
list signatures
2018-05-17 19:15:14 +00:00
--SKIPIF--
<?php if (!extension_loaded("gnupg")) die("skip"); ?>
2006-05-18 19:32:32 +00:00
--FILE--
<?php
2018-05-17 19:15:14 +00:00
require_once "gnupgt.inc";
gnupgt::import_key();
2006-11-03 12:39:53 +00:00
$gpg = gnupg_init();
gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING);
$ret = gnupg_listsignatures($gpg, $fingerprint);
$k1 = "testkey (testkey) <test@example.net>";
$k2 = "2E96F141B3DD2B2E";
gnupgt::check_array('testkey (testkey) <test@example.net>', $ret, $k1, $k2, 'uid');
gnupgt::check_array('testkey', $ret, $k1, $k2, 'name');
gnupgt::check_array('test@example.net', $ret, $k1, $k2, 'email');
gnupgt::check_array('testkey', $ret, $k1, $k2, 'comment');
gnupgt::check_array(0, $ret, $k1, $k2, 'expires');
gnupgt::check_array(false, $ret, $k1, $k2, 'revoked');
gnupgt::check_array(false, $ret, $k1, $k2, 'expired');
gnupgt::check_array(false, $ret, $k1, $k2, 'invalid');
gnupgt::check_array(1129316524, $ret, $k1, $k2, 'timestamp');
2006-05-18 19:32:32 +00:00
?>
Done
2006-05-18 19:32:32 +00:00
--EXPECT--
Done
2018-05-17 19:15:14 +00:00
--CLEAN--
<?php
require_once "gnupgt.inc";
gnupgt::delete_key();
?>