Changeset 7795
- Timestamp:
- 03/10/08 16:39:49 (7 months ago)
- Files:
-
- branches/1.1/lib/helper/UrlHelper.php (modified) (1 diff)
- branches/1.1/test/unit/helper/UrlHelperTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/lib/helper/UrlHelper.php
r7757 r7795 165 165 if ($condition) 166 166 { 167 unset($options['tag']); 167 168 return link_to($name, $internal_uri, $options); 168 169 } branches/1.1/test/unit/helper/UrlHelperTest.php
r7757 r7795 20 20 } 21 21 22 $t = new lime_test(2 4, new lime_output_color());22 $t = new lime_test(25, new lime_output_color()); 23 23 24 24 $context = sfContext::getInstance(array('controller' => 'myController')); … … 70 70 $t->is(link_to_if(false, 'test', ''), '<span>test</span>', 'link_to_if() returns an HTML "span" tag by default if the condition is false'); 71 71 $t->is(link_to_if(false, 'test', '', array('tag' => 'div')), '<div>test</div>', 'link_to_if() takes a "tag" option'); 72 $t->is(link_to_if(true, 'test', '', array('tag' => 'div')), '<a href="module/action">test</a>', 'link_to_if() removes "tag" option in true case'); 72 73 $t->is(link_to_if(false, 'test', '', array('query_string' => 'foo=bar', 'absolute' => true, 'absolute_url' => 'http://www.google.com/')), '<span>test</span>', 'link_to_if() returns an HTML "span" tag by default if the condition is false'); 73 74