Changeset 7794
- Timestamp:
- 03/10/08 16:37:46 (1 year ago)
- Files:
-
- branches/1.0/lib/helper/UrlHelper.php (modified) (1 diff)
- branches/1.0/test/unit/helper/UrlHelperTest.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.0/lib/helper/UrlHelper.php
r6203 r7794 165 165 if ($condition) 166 166 { 167 unset($options['tag']); 167 168 return link_to($name, $internal_uri, $options); 168 169 } branches/1.0/test/unit/helper/UrlHelperTest.php
r4195 r7794 43 43 } 44 44 45 $t = new lime_test(2 4, new lime_output_color());45 $t = new lime_test(25, new lime_output_color()); 46 46 47 47 $context = sfContext::getInstance(); … … 90 90 $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'); 91 91 $t->is(link_to_if(false, 'test', '', array('tag' => 'div')), '<div>test</div>', 'link_to_if() takes a "tag" option'); 92 $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'); 92 93 $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'); 93 94 … … 96 97 $t->is(link_to_unless(false, 'test', ''), '<a href="module/action">test</a>', 'link_to_unless() returns an HTML "a" tag if the condition is false'); 97 98 $t->is(link_to_unless(true, 'test', ''), '<span>test</span>', 'link_to_unless() returns an HTML "span" tag by default if the condition is true'); 99 98 100 99 101 // mail_to()

