[limb-svn] r6904 - in 3.x/trunk/limb/toolkit: src tests/cases
svn at limb-project.com
svn at limb-project.com
Wed Apr 9 23:22:55 MSD 2008
Author: pachanga
Date: 2008-04-09 23:22:54 +0400 (Wed, 09 Apr 2008)
New Revision: 6904
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6904
Modified:
3.x/trunk/limb/toolkit/src/lmbToolkit.class.php
3.x/trunk/limb/toolkit/tests/cases/lmbToolkitTest.class.php
Log:
-- non-existing method always throws an exception in toolkit
Modified: 3.x/trunk/limb/toolkit/src/lmbToolkit.class.php
===================================================================
--- 3.x/trunk/limb/toolkit/src/lmbToolkit.class.php 2008-04-09 05:51:05 UTC (rev 6903)
+++ 3.x/trunk/limb/toolkit/src/lmbToolkit.class.php 2008-04-09 19:22:54 UTC (rev 6904)
@@ -242,7 +242,7 @@
if(isset($this->_tools_signatures[$method]))
return call_user_func_array(array($this->_tools_signatures[$method], $method), $args);
- return parent :: __call($method, $args);
+ throw new lmbNoSuchMethodException("No such method '$method' exists in toolkit");
}
/**
Modified: 3.x/trunk/limb/toolkit/tests/cases/lmbToolkitTest.class.php
===================================================================
--- 3.x/trunk/limb/toolkit/tests/cases/lmbToolkitTest.class.php 2008-04-09 05:51:05 UTC (rev 6903)
+++ 3.x/trunk/limb/toolkit/tests/cases/lmbToolkitTest.class.php 2008-04-09 19:22:54 UTC (rev 6904)
@@ -79,6 +79,30 @@
catch(lmbException $e){}
}
+ function testNonExistingSetterThrowsError()
+ {
+ $toolkit = new lmbToolkit();
+
+ try
+ {
+ $toolkit->setNonExistingStuff("bar");
+ $this->assertTrue(false);
+ }
+ catch(lmbException $e){}
+ }
+
+ function testNonExistingGetterThrowsError()
+ {
+ $toolkit = new lmbToolkit();
+
+ try
+ {
+ $toolkit->getNonExistingStuff();
+ $this->assertTrue(false);
+ }
+ catch(lmbException $e){}
+ }
+
function testAddTools()
{
$toolkit = new lmbToolkit();
More information about the limb-svn
mailing list