cvs: pear /Crypt_GPG/tests DriverTestCase.php

From: Date: Sat, 05 Apr 2008 03:37:19 +0000
Subject: cvs: pear /Crypt_GPG/tests DriverTestCase.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-51802@lists.php.net to get a copy of this message
gauthierm Sat Apr 5 03:37:19 2008 UTC Modified files: /pear/Crypt_GPG/tests DriverTestCase.php Log: Fix #13596. Unit tests fail comparing GPG key blocks on different systems. http://cvs.php.net/viewvc.cgi/pear/Crypt_GPG/tests/DriverTestCase.php?r1=1.4&r2=1.5&diff_format=u Index: pear/Crypt_GPG/tests/DriverTestCase.php diff -u pear/Crypt_GPG/tests/DriverTestCase.php:1.4 pear/Crypt_GPG/tests/DriverTestCase.php:1.5 --- pear/Crypt_GPG/tests/DriverTestCase.php:1.4 Mon Mar 31 14:51:42 2008 +++ pear/Crypt_GPG/tests/DriverTestCase.php Sat Apr 5 03:37:18 2008 @@ -31,7 +31,7 @@ * @author Michael Gauthier <mike@silverorange.com> * @copyright 2005-2008 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 - * @version CVS: $Id: DriverTestCase.php,v 1.4 2008/03/31 14:51:42 gauthierm Exp $ + * @version CVS: $Id: DriverTestCase.php,v 1.5 2008/04/05 03:37:18 gauthierm Exp $ * @link http://pear.php.net/package/Crypt_GPG */ @@ -652,10 +652,8 @@ $key_id = 'public-only@example.com'; // {{{ expected key data + // OpenPGP header is not included since it varies from system-to-system. $expected_key_data = <<<TEXT ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.6 (GNU/Linux) - mQGiBEeQxv0RBAD+cWerD9h+b135x1/m5NWuwpUNpkE7Be4X8PxpwuAHDN2B2QK4 fGF1XWP70RMcvKNx7xR/fbQ25jaHuWPxrxolUADJJwwUqpRZq/ObGo3NWhldVsm2 iU5M2KMwc6D5XQICObyOe9WUJ7HNGKNPclNQzFyhaOA0JcQN+mTlnfwfGwCg2vuY @@ -689,7 +687,10 @@ // }}} $key_data = $this->_gpg->exportPublicKey($key_id); - $this->assertEquals($expected_key_data, $key_data); + + // Check for containment rather than equality since the OpenPGP header + // varies from system to system. + $this->assertContains($expected_key_data, $key_data); } // }}}

« previous php.pear.cvs (#51802) next »