Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow PGP backend drivers to be tested separately
- Loading branch information
Showing
3 changed files
with
109 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* Tests for the PGP binary backend. | ||
* | ||
* @author Michael Slusarz <slusarz@horde.org> | ||
* @category Horde | ||
* @copyright 2015 Horde LLC | ||
* @ignore | ||
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1 | ||
* @package Crypt | ||
* @subpackage UnitTests | ||
*/ | ||
class Horde_Crypt_Pgp_BinaryTest | ||
extends Horde_Crypt_Pgp_TestBase | ||
{ | ||
protected function _setUp() | ||
{ | ||
$c = self::getConfig('CRYPTPGP_TEST_CONFIG', __DIR__ . '/../'); | ||
$gnupg = isset($c['gnupg']) | ||
? $c['gnupg'] | ||
: '/usr/bin/gpg'; | ||
|
||
if (!is_executable($gnupg)) { | ||
$this->markTestSkipped(sprintf( | ||
'GPG binary not found at %s.', | ||
$gnupg | ||
)); | ||
} | ||
|
||
return array( | ||
new Horde_Crypt_Pgp_Backend_Binary($gnupg, sys_get_temp_dir()) | ||
); | ||
} | ||
|
||
} |
Oops, something went wrong.