[limb-svn] r6991 - in 3.x/trunk/limb: view/src web_app/src/controller web_app/tests web_app/tests/bench web_app/tests/cases/plain/controller
svn at limb-project.com
svn at limb-project.com
Sat May 10 12:23:17 MSD 2008
Author: pachanga
Date: 2008-05-10 12:23:17 +0400 (Sat, 10 May 2008)
New Revision: 6991
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6991
Added:
3.x/trunk/limb/web_app/tests/bench/
3.x/trunk/limb/web_app/tests/bench/.skipif.php
3.x/trunk/limb/web_app/tests/bench/server.php
Modified:
3.x/trunk/limb/view/src/lmbDummyView.class.php
3.x/trunk/limb/web_app/src/controller/lmbController.class.php
3.x/trunk/limb/web_app/tests/cases/plain/controller/lmbControllerTest.class.php
Log:
-- adding minimal web_app application -- lmbDummyView::render() doesn't throw exception \
-- lmbController doesn't write 'dummy' stuff into response
Modified: 3.x/trunk/limb/view/src/lmbDummyView.class.php
===================================================================
--- 3.x/trunk/limb/view/src/lmbDummyView.class.php 2008-05-09 19:40:26 UTC (rev 6990)
+++ 3.x/trunk/limb/view/src/lmbDummyView.class.php 2008-05-10 08:23:17 UTC (rev 6991)
@@ -23,7 +23,7 @@
function render()
{
- throw new lmbException("It's a dummy view, its render method should never be called");
+ return '';
}
}
Modified: 3.x/trunk/limb/web_app/src/controller/lmbController.class.php
===================================================================
--- 3.x/trunk/limb/web_app/src/controller/lmbController.class.php 2008-05-09 19:40:26 UTC (rev 6990)
+++ 3.x/trunk/limb/web_app/src/controller/lmbController.class.php 2008-05-10 08:23:17 UTC (rev 6991)
@@ -164,9 +164,6 @@
if(is_string($res))
$this->response->write($res);
- elseif($this->response->isEmpty() && is_a($this->view, 'lmbDummyView'))
- $this->response->write('Default dummy output for controller "' .
- get_class($this) . '" action "' . $this->current_action . '"');
return $res;
}
Added: 3.x/trunk/limb/web_app/tests/bench/.skipif.php
===================================================================
--- 3.x/trunk/limb/web_app/tests/bench/.skipif.php (rev 0)
+++ 3.x/trunk/limb/web_app/tests/bench/.skipif.php 2008-05-10 08:23:17 UTC (rev 6991)
@@ -0,0 +1,4 @@
+<?php
+return true;
+
+
Added: 3.x/trunk/limb/web_app/tests/bench/server.php
===================================================================
--- 3.x/trunk/limb/web_app/tests/bench/server.php (rev 0)
+++ 3.x/trunk/limb/web_app/tests/bench/server.php 2008-05-10 08:23:17 UTC (rev 6991)
@@ -0,0 +1,31 @@
+<?php
+set_include_path(dirname(__FILE__) . '/../../../../');
+
+define('LIMB_VAR_DIR', dirname(__FILE__) . '/../../../var/');
+
+require_once('limb/core/common.inc.php');
+require_once('limb/web_app/common.inc.php');
+require_once('limb/web_app/src/controller/lmbController.class.php');
+require_once('limb/filter_chain/src/lmbFilterChain.class.php');
+require_once('limb/core/src/lmbHandle.class.php');
+
+class DefaultController extends lmbController
+{
+ function doDisplay()
+ {
+ return "Hello, world!";
+ }
+}
+
+$application = new lmbFilterChain();
+
+$application->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbUncaughtExceptionHandlingFilter'));
+$application->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbSessionStartupFilter'));
+$application->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbRequestDispatchingFilter',
+ array(new lmbHandle('limb/web_app/src/request/lmbRoutesRequestDispatcher'), 'default')));
+$application->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbResponseTransactionFilter'));
+$application->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbActionPerformingFilter'));
+
+$application->registerFilter(new lmbHandle('limb/web_app/src/filter/lmbViewRenderingFilter'));
+$application->process();
+
Modified: 3.x/trunk/limb/web_app/tests/cases/plain/controller/lmbControllerTest.class.php
===================================================================
--- 3.x/trunk/limb/web_app/tests/cases/plain/controller/lmbControllerTest.class.php 2008-05-09 19:40:26 UTC (rev 6990)
+++ 3.x/trunk/limb/web_app/tests/cases/plain/controller/lmbControllerTest.class.php 2008-05-10 08:23:17 UTC (rev 6991)
@@ -202,7 +202,7 @@
$controller = new TestingController();
$controller->setCurrentAction('without_popup');
$controller->performAction();
- $this->assertPattern('~^Default dummy output~', $this->toolkit->getResponse()->getResponseString());
+ $this->assertEqual('', $this->toolkit->getResponse()->getResponseString());
}
}
More information about the limb-svn
mailing list