Refactore all test to be independent

This commit is contained in:
Jakub Zelenka 2018-05-17 20:15:14 +01:00
parent 3bb4d28798
commit 4aabe3c966
26 changed files with 306 additions and 108 deletions

View file

@ -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();
?>