[limb-svn] r5962 - in 3.x/trunk/limb/view: src/wact tests/cases
svn at limb-project.com
svn at limb-project.com
Fri Jun 8 11:03:30 MSD 2007
Author: serega
Date: 2007-06-08 11:03:30 +0400 (Fri, 08 Jun 2007)
New Revision: 5962
URL: http://fisheye.limb-project.com/changelog/limb/?cs=5962
Modified:
3.x/trunk/limb/view/src/wact/lmbWactTemplate.class.php
3.x/trunk/limb/view/tests/cases/lmbWactViewTest.class.php
Log:
-- lmbWactTemplate uses LIMB_VAR_DIR / compiled as cache dir if none is sent to constructor
Modified: 3.x/trunk/limb/view/src/wact/lmbWactTemplate.class.php
===================================================================
--- 3.x/trunk/limb/view/src/wact/lmbWactTemplate.class.php 2007-06-07 21:48:53 UTC (rev 5961)
+++ 3.x/trunk/limb/view/src/wact/lmbWactTemplate.class.php 2007-06-08 07:03:30 UTC (rev 5962)
@@ -1,10 +1,10 @@
<?php
-/*
- * Limb PHP Framework
- *
- * @link http://limb-project.com
- * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
+/*
+ * Limb PHP Framework
+ *
+ * @link http://limb-project.com
+ * @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
*/
lmb_require('limb/view/wact.inc.php');
lmb_require('limb/view/src/wact/lmbWactTemplateConfig.class.php');
@@ -18,8 +18,11 @@
*/
class lmbWactTemplate extends WactTemplate
{
- function __construct($template_path, $cache_dir)
+ function __construct($template_path, $cache_dir = '')
{
+ if(!$cache_dir && defined('LIMB_VAR_DIR'))
+ $cache_dir = LIMB_VAR_DIR . '/compiled/';
+
$config = new lmbWactTemplateConfig($cache_dir);
$locator = lmbToolkit :: instance()->getWactLocator();
parent :: __construct($template_path, $config, $locator);
Modified: 3.x/trunk/limb/view/tests/cases/lmbWactViewTest.class.php
===================================================================
--- 3.x/trunk/limb/view/tests/cases/lmbWactViewTest.class.php 2007-06-07 21:48:53 UTC (rev 5961)
+++ 3.x/trunk/limb/view/tests/cases/lmbWactViewTest.class.php 2007-06-08 07:03:30 UTC (rev 5962)
@@ -59,13 +59,13 @@
$template = $view->getWACTTemplate();
$form1_component = $template->findChild('form1');
- $this->assertEqual($form1_component->getDatasource(), $form1);
+ $this->assertReference($form1_component->getDataSource(), $form1);
$this->assertEqual($form1_component->getErrorsDataSet()->export(), $error_list->getReadable()->export());
$this->assertEqual($form1_component->getErrorsDataSet()->at(0)->getMessage(),
'An error in "Title" with value');
$form2_component = $template->findChild('form2');
- $this->assertEqual($form2_component->getDatasource(), $form2);
+ $this->assertReference($form2_component->getDataSource(), $form2);
}
}
More information about the limb-svn
mailing list