From: Michael J. Rubinsky Date: Mon, 12 Apr 2010 18:55:15 +0000 (-0400) Subject: Don't run these tests if the NLS system cannot be initialized X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a5d72285432f231d31ff120b27620b300926e2ec;p=horde.git Don't run these tests if the NLS system cannot be initialized --- diff --git a/framework/ActiveSync/test/Horde/ActiveSync/HordeDriverTest.php b/framework/ActiveSync/test/Horde/ActiveSync/HordeDriverTest.php index acd7d645a..93ec4824e 100644 --- a/framework/ActiveSync/test/Horde/ActiveSync/HordeDriverTest.php +++ b/framework/ActiveSync/test/Horde/ActiveSync/HordeDriverTest.php @@ -129,10 +129,17 @@ class Horde_ActiveSync_HordeDriverTest extends Horde_Test_Case 'smimePublicKey' => '', ); - // Need to init the Nls system if (version_compare(PHP_VERSION, '5.3.0', '>=')) { error_reporting(E_ALL & ~E_DEPRECATED); } + + /* This test REQUIRES that the NLS system be initialized, so skip this + * if we don't have a configured horde + */ + if (!file_exists(dirname(__FILE__) . '/../../../../../horde/config/conf.php')) { + $this->markTestIncomplete('Test requires the NLS system'); + return; + } require_once dirname(__FILE__) . '/../../../../../horde/lib/core.php'; Horde_Nls::setLanguage(); @@ -171,10 +178,17 @@ class Horde_ActiveSync_HordeDriverTest extends Horde_Test_Case */ public function testStreamerUTF8() { - // Need to init the Nls system if (version_compare(PHP_VERSION, '5.3.0', '>=')) { error_reporting(E_ALL & ~E_DEPRECATED); } + + /* This test REQUIRES that the NLS system be initialized, so skip this + * if we don't have a configured horde + */ + if (!file_exists(dirname(__FILE__) . '/../../../../../horde/config/conf.php')) { + $this->markTestIncomplete('Test requires the NLS system'); + return; + } require_once dirname(__FILE__) . '/../../../../../horde/lib/core.php'; Horde_Nls::setLanguage(); @@ -224,10 +238,18 @@ class Horde_ActiveSync_HordeDriverTest extends Horde_Test_Case $message->homestate = 'NJ'; $message->homepostalcode = '08080'; - // Need to init the Nls system + if (version_compare(PHP_VERSION, '5.3.0', '>=')) { error_reporting(E_ALL & ~E_DEPRECATED); } + + /* This test REQUIRES that the NLS system be initialized, so skip this + * if we don't have a configured horde + */ + if (!file_exists(dirname(__FILE__) . '/../../../../../horde/config/conf.php')) { + $this->markTestIncomplete('Test requires the NLS system'); + return; + } require_once dirname(__FILE__) . '/../../../../../horde/lib/core.php'; Horde_Nls::setLanguage();