diff --git a/tests/gnupg_oo_init_file_name.phpt b/tests/gnupg_oo_init_file_name.phpt new file mode 100644 index 0000000..42b29fa --- /dev/null +++ b/tests/gnupg_oo_init_file_name.phpt @@ -0,0 +1,21 @@ +--TEST-- +init object with custom file_name +--SKIPIF-- + +--FILE-- + '/usr/bin/gpg')); +$engine = $gpg->getengineinfo(); +var_dump($engine['file_name']); +?> +--EXPECT-- +string(12) "/usr/bin/gpg" \ No newline at end of file diff --git a/tests/gnupg_oo_init_home_dir.phpt b/tests/gnupg_oo_init_home_dir.phpt index 76bb1b6..a57632c 100644 --- a/tests/gnupg_oo_init_home_dir.phpt +++ b/tests/gnupg_oo_init_home_dir.phpt @@ -18,12 +18,16 @@ foreach (glob("$homedir/*") as $filename) { $imported = true; } var_dump($imported); +$engine = $gpg->getengineinfo(); +var_dump($engine['home_dir'] === $homedir); ?> --EXPECT-- bool(true) +bool(true) --CLEAN-- +--FILE-- + '/usr/bin/gpg')); +$engine = gnupg_getengineinfo($gpg); +var_dump($engine['file_name']); +?> +--EXPECT-- +string(12) "/usr/bin/gpg" \ No newline at end of file diff --git a/tests/gnupg_res_init_home_dir.phpt b/tests/gnupg_res_init_home_dir.phpt new file mode 100644 index 0000000..6d0eaf4 --- /dev/null +++ b/tests/gnupg_res_init_home_dir.phpt @@ -0,0 +1,34 @@ +--TEST-- +init resource with custom home_dir +--SKIPIF-- + +--FILE-- + $homedir)); +gnupg_seterrormode($gpg, gnupg::ERROR_WARNING); +gnupg_import($gpg, $testkey); +$imported = false; +foreach (glob("$homedir/*") as $filename) { + $imported = true; +} +var_dump($imported); +$engine = gnupg_getengineinfo($gpg); +var_dump($engine['home_dir'] === $homedir); +?> +--EXPECT-- +bool(true) +bool(true) +--CLEAN-- +