mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-06 14:21:34 +00:00
Add complete coverage for init
This commit is contained in:
parent
587a5f9400
commit
1779a02f74
4 changed files with 81 additions and 1 deletions
21
tests/gnupg_res_init_file_name.phpt
Normal file
21
tests/gnupg_res_init_file_name.phpt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--TEST--
|
||||
init resource with custom file_name
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if(!class_exists("gnupg")) {
|
||||
die("skip");
|
||||
}
|
||||
if (!file_exists('/usr/bin/gpg')) {
|
||||
die("skip /usr/bin/gpg does not exist");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
require_once "gnupgt.inc";
|
||||
|
||||
$gpg = gnupg_init(array('file_name' => '/usr/bin/gpg'));
|
||||
$engine = gnupg_getengineinfo($gpg);
|
||||
var_dump($engine['file_name']);
|
||||
?>
|
||||
--EXPECT--
|
||||
string(12) "/usr/bin/gpg"
|
||||
Loading…
Add table
Add a link
Reference in a new issue