mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-04 05:11:34 +00:00
Add gnupg_getengineinfo
This commit is contained in:
parent
60e13bec5a
commit
587a5f9400
4 changed files with 85 additions and 0 deletions
29
tests/gnupg_oo_getengineinfo.phpt
Normal file
29
tests/gnupg_oo_getengineinfo.phpt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
--TEST--
|
||||
get keyinfo
|
||||
--SKIPIF--
|
||||
<?php if(!class_exists("gnupg")) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::import_key();
|
||||
|
||||
$gpg = new gnupg();
|
||||
$ret = $gpg->getengineinfo($fingerprint);
|
||||
var_dump($ret);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
["protocol"]=>
|
||||
int(0)
|
||||
["file_name"]=>
|
||||
string(%d) %s
|
||||
["home_dir"]=>
|
||||
string(0) ""
|
||||
}
|
||||
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::delete_key();
|
||||
?>
|
||||
|
||||
29
tests/gnupg_res_getengineinfo.phpt
Normal file
29
tests/gnupg_res_getengineinfo.phpt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
--TEST--
|
||||
get keyinfo
|
||||
--SKIPIF--
|
||||
<?php if(!class_exists("gnupg")) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::import_key();
|
||||
|
||||
$gpg = gnupg_init();
|
||||
$ret = gnupg_getengineinfo($gpg);
|
||||
var_dump($ret);
|
||||
?>
|
||||
--EXPECTF--
|
||||
array(3) {
|
||||
["protocol"]=>
|
||||
int(0)
|
||||
["file_name"]=>
|
||||
string(%d) %s
|
||||
["home_dir"]=>
|
||||
string(0) ""
|
||||
}
|
||||
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::delete_key();
|
||||
?>
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue