[limb-svn] r5879 - 3.x/trunk/limb/wact/tests/cases/tags/core
svn at limb-project.com
svn at limb-project.com
Sun May 13 15:22:40 MSD 2007
Author: serega
Date: 2007-05-13 15:22:40 +0400 (Sun, 13 May 2007)
New Revision: 5879
URL: http://fisheye.limb-project.com/changelog/limb/?cs=5879
Modified:
3.x/trunk/limb/wact/tests/cases/tags/core/WactCoreDatasourceTagTest.class.php
Log:
-- better tests for <core:datasource> tag
Modified: 3.x/trunk/limb/wact/tests/cases/tags/core/WactCoreDatasourceTagTest.class.php
===================================================================
--- 3.x/trunk/limb/wact/tests/cases/tags/core/WactCoreDatasourceTagTest.class.php 2007-05-13 11:14:57 UTC (rev 5878)
+++ 3.x/trunk/limb/wact/tests/cases/tags/core/WactCoreDatasourceTagTest.class.php 2007-05-13 11:22:40 UTC (rev 5879)
@@ -98,7 +98,7 @@
$this->assertEqual($output, 'middle:outer:outer');
}
- function testDBEFromAttribute()
+ function testFromAttributeDataTakenFromRoot()
{
$template =
'<core:datasource>' .
@@ -107,14 +107,33 @@
'</core:datasource>'.
'</core:datasource>';
- $this->registerTestingTemplate('/tags/core/dataspace/dbe_from_attribute.html', $template);
- $page = $this->initTemplate('/tags/core/dataspace/dbe_from_attribute.html');
+ $this->registerTestingTemplate('/tags/core/dataspace/from_attribute_root.html', $template);
+ $page = $this->initTemplate('/tags/core/dataspace/from_attribute_root.html');
$page->set('middle', array('Var' => 'middle'));
$output = $page->capture();
$this->assertEqual($output, 'middle');
}
+
+ function testFromAttributeDataTakenFromPhpVariable()
+ {
+ $template =
+ '<?php $middle = array("Var" => "middle"); ?>'.
+ '<core:datasource>' .
+ '<core:datasource from="{$$middle}">' .
+ '{$Var}' .
+ '</core:datasource>'.
+ '</core:datasource>';
+
+ $this->registerTestingTemplate('/tags/core/dataspace/from_attribute_php_variable.html', $template);
+ $page = $this->initTemplate('/tags/core/dataspace/from_attribute_php_variable.html');
+
+ $output = $page->capture();
+ $this->assertEqual($output, 'middle');
+ }
+
+
function testOldFormOfFromAttribute()
{
$template =
More information about the limb-svn
mailing list