mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-06 14:21: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
|
|
@ -1,10 +1,12 @@
|
|||
--TEST--n
|
||||
--TEST--
|
||||
import a new key into the keyring
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("gnupg")) die("skip"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once(dirname(__FILE__)."/vars.inc");
|
||||
@unlink (dirname(__FILE__)."/pubring.gpg");
|
||||
@unlink (dirname(__FILE__)."/secring.gpg");
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::delete_key();
|
||||
|
||||
$gpg = gnupg_init();
|
||||
gnupg_seterrormode($gpg, GNUPG_ERROR_WARNING);
|
||||
$ret = gnupg_import($gpg, $testkey);
|
||||
|
|
@ -31,3 +33,8 @@ array(9) {
|
|||
["fingerprint"]=>
|
||||
string(40) "64DF06E42FCF2094590CDEEE2E96F141B3DD2B2E"
|
||||
}
|
||||
--CLEAN--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
gnupgt::delete_key();
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue