[limb-svn] r6853 - in 3.x/trunk/limb: core/tests/cases macro/tests/cases

svn at limb-project.com svn at limb-project.com
Sun Mar 23 19:52:58 MSK 2008


Author: pachanga
Date: 2008-03-23 19:52:58 +0300 (Sun, 23 Mar 2008)
New Revision: 6853
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6853

Modified:
   3.x/trunk/limb/core/tests/cases/.setup.php
   3.x/trunk/limb/macro/tests/cases/.setup.php
Log:
-- making fixtures more flexible

Modified: 3.x/trunk/limb/core/tests/cases/.setup.php
===================================================================
--- 3.x/trunk/limb/core/tests/cases/.setup.php	2008-03-23 16:39:18 UTC (rev 6852)
+++ 3.x/trunk/limb/core/tests/cases/.setup.php	2008-03-23 16:52:58 UTC (rev 6853)
@@ -1,9 +1,9 @@
 <?php
-
 if(!defined('LIMB_VAR_DIR'))
 {
   @define('LIMB_VAR_DIR', dirname(__FILE__) . '/../../../var');
-  @mkdir(LIMB_VAR_DIR);
+  if(!is_dir(LIMB_VAR_DIR) && !mkdir(LIMB_VAR_DIR))
+    throw new Exception("Could not create LIMB_VAR_DIR at '" . LIMB_VAR_DIR . "' during tests execution");
 }
 
 require_once(dirname(__FILE__) . '/../../common.inc.php');

Modified: 3.x/trunk/limb/macro/tests/cases/.setup.php
===================================================================
--- 3.x/trunk/limb/macro/tests/cases/.setup.php	2008-03-23 16:39:18 UTC (rev 6852)
+++ 3.x/trunk/limb/macro/tests/cases/.setup.php	2008-03-23 16:52:58 UTC (rev 6853)
@@ -2,7 +2,8 @@
 if(!defined('LIMB_VAR_DIR'))
 {
   @define('LIMB_VAR_DIR', dirname(__FILE__) . '/../../../var');
-  @mkdir(LIMB_VAR_DIR);
+  if(!is_dir(LIMB_VAR_DIR) && !mkdir(LIMB_VAR_DIR))
+    throw new Exception("Could not create LIMB_VAR_DIR at '" . LIMB_VAR_DIR . "' during tests execution");
 }
 
 require_once(dirname(__FILE__) . '/../../common.inc.php');



More information about the limb-svn mailing list