Author: chabotc
Date: Wed Aug 12 14:52:47 2009
New Revision: 803544

URL: http://svn.apache.org/viewvc?rev=803544&view=rev
Log:
SHINDIG-1151 by Arne Roomann-Kurrik - Running PHP unit tests does not load 
local.config consistently

Modified:
    incubator/shindig/trunk/php/src/common/Config.php
    incubator/shindig/trunk/php/test/common/BasicRemoteContentTest.php

Modified: incubator/shindig/trunk/php/src/common/Config.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/src/common/Config.php?rev=803544&r1=803543&r2=803544&view=diff
==============================================================================
--- incubator/shindig/trunk/php/src/common/Config.php (original)
+++ incubator/shindig/trunk/php/src/common/Config.php Wed Aug 12 14:52:47 2009
@@ -34,10 +34,11 @@
       // load default configuration
       include_once 'config/container.php';
       self::$config = $shindigConfig;
-      if (file_exists('config/local.php')) {
+      $localConfigPath = realpath(dirname(__FILE__) . 
"/../../config/local.php");
+      if (file_exists($localConfigPath)) {
         // include local.php if it exists and merge the config arrays.
         // the second array values overwrites the first one's
-        include_once 'config/local.php';
+        include_once $localConfigPath;
         self::$config = array_merge(self::$config, $shindigConfig);
       }
     }

Modified: incubator/shindig/trunk/php/test/common/BasicRemoteContentTest.php
URL: 
http://svn.apache.org/viewvc/incubator/shindig/trunk/php/test/common/BasicRemoteContentTest.php?rev=803544&r1=803543&r2=803544&view=diff
==============================================================================
--- incubator/shindig/trunk/php/test/common/BasicRemoteContentTest.php 
(original)
+++ incubator/shindig/trunk/php/test/common/BasicRemoteContentTest.php Wed Aug 
12 14:52:47 2009
@@ -43,9 +43,9 @@
    */
   public function __construct() {
     $privkey = openssl_pkey_new();
-    openssl_pkey_export($privkey, $rsa_private_key, "partuza"); //the string 
must be same as shindig container private_key_phrase
-    
     $phrase = Config::get('private_key_phrase') != '' ? 
(Config::get('private_key_phrase')) : null;
+    openssl_pkey_export($privkey, $rsa_private_key, $phrase);
+    
     if (! $rsa_private_key = @openssl_pkey_get_private($rsa_private_key, 
$phrase)) {
       throw new Exception("Could not create the key");
     }


Reply via email to