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

@ -4,15 +4,16 @@ export a key
<?php if(!class_exists("gnupg")) die("skip"); ?>
--FILE--
<?php
require_once(dirname(__FILE__)."/vars.inc");
require_once "gnupgt.inc";
gnupgt::import_key();
$gpg = new gnupg();
$gpg -> seterrormode(gnupg::ERROR_WARNING);
$ret = $gpg -> export($fingerprint);
$gpg->seterrormode(gnupg::ERROR_WARNING);
$ret = $gpg->export($fingerprint);
var_dump($ret);
?>
--EXPECTF--
string(%d) "-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQGiBENQAKwRBADpy828KU+0SuoetJTrJ5dR86PiO3CsH8K6QRP7wY82Eh/9NTJ3
afRj0FNPaVSP0NciPeM4G4uFoQ3lsIf+FBEPXH1D97/XigWObU8K6ha2/s8wU98z
@ -36,3 +37,8 @@ drhhPQJw1AY6GEpSbK0JtACeJuewK8C1wO1l5OYkGzFpb4VgquI=
=twR+
-----END PGP PUBLIC KEY BLOCK-----
"
--CLEAN--
<?php
require_once "gnupgt.inc";
gnupgt::delete_key();
?>