mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-06 06:11:34 +00:00
Refactore all test to be independent
This commit is contained in:
parent
3bb4d28798
commit
4aabe3c966
26 changed files with 306 additions and 108 deletions
40
tests/gnupg_oo_import.phpt
Normal file
40
tests/gnupg_oo_import.phpt
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
--TEST--
|
||||
import a new key into the keyring
|
||||
--SKIPIF--
|
||||
<?php if(!class_exists("gnupg")) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::delete_key();
|
||||
|
||||
$gpg = new gnupg();
|
||||
$gpg->seterrormode(gnupg::ERROR_WARNING);
|
||||
$ret = $gpg->import($testkey);
|
||||
var_dump($ret);
|
||||
?>
|
||||
--EXPECT--
|
||||
array(9) {
|
||||
["imported"]=>
|
||||
int(1)
|
||||
["unchanged"]=>
|
||||
int(0)
|
||||
["newuserids"]=>
|
||||
int(0)
|
||||
["newsubkeys"]=>
|
||||
int(0)
|
||||
["secretimported"]=>
|
||||
int(1)
|
||||
["secretunchanged"]=>
|
||||
int(0)
|
||||
["newsignatures"]=>
|
||||
int(0)
|
||||
["skippedkeys"]=>
|
||||
int(0)
|
||||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
}
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::delete_key();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue