[limb-svn] r6975 - in 3.x/trunk/limb/config: src tests/cases

svn at limb-project.com svn at limb-project.com
Tue Apr 29 15:58:42 MSD 2008


Author: korchasa
Date: 2008-04-29 15:58:42 +0400 (Tue, 29 Apr 2008)
New Revision: 6975
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6975

Modified:
   3.x/trunk/limb/config/src/lmbConf.class.php
   3.x/trunk/limb/config/tests/cases/lmbConfTest.class.php
Log:
-- throw exception for not existed values in configuration

Modified: 3.x/trunk/limb/config/src/lmbConf.class.php
===================================================================
--- 3.x/trunk/limb/config/src/lmbConf.class.php	2008-04-29 11:20:46 UTC (rev 6974)
+++ 3.x/trunk/limb/config/src/lmbConf.class.php	2008-04-29 11:58:42 UTC (rev 6975)
@@ -2,11 +2,11 @@
 /*
  * Limb PHP Framework
  *
- * @link http://limb-project.com 
+ * @link http://limb-project.com
  * @copyright  Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
  */
-lmb_require('limb/core/src/lmbSet.class.php');
+lmb_require('limb/core/src/lmbObject.class.php');
 
 /**
  * class lmbConf.
@@ -14,7 +14,7 @@
  * @package config
  * @version $Id$
  */
-class lmbConf extends lmbSet
+class lmbConf extends lmbObject
 {
   function __construct($file)
   {

Modified: 3.x/trunk/limb/config/tests/cases/lmbConfTest.class.php
===================================================================
--- 3.x/trunk/limb/config/tests/cases/lmbConfTest.class.php	2008-04-29 11:20:46 UTC (rev 6974)
+++ 3.x/trunk/limb/config/tests/cases/lmbConfTest.class.php	2008-04-29 11:58:42 UTC (rev 6975)
@@ -2,9 +2,9 @@
 /*
  * Limb PHP Framework
  *
- * @link http://limb-project.com 
+ * @link http://limb-project.com
  * @copyright  Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
+ * @license    LGPL http://www.gnu.org/copyleft/lesser.html
  */
 lmb_require('limb/config/src/lmbConf.class.php');
 
@@ -34,6 +34,20 @@
 
     $this->assertEqual($result, array('foo' => 1, 'bar' => 2));
   }
+
+  function testGetNotExistedOption()
+  {
+    $conf = new lmbConf(dirname(__FILE__) . '/conf.php');
+
+    try {
+      $a = $conf->get('some_not_existed_option');
+      $this->fail();
+    } catch (lmbException $e)
+    {
+      $this->pass();
+    }
+
+  }
 }
 
 



More information about the limb-svn mailing list