Changeset 8840
- Timestamp:
- 05/07/08 19:04:40 (5 months ago)
- Files:
-
- branches/1.1/test/unit/helper/UrlHelperTest.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/1.1/test/unit/helper/UrlHelperTest.php
r8837 r8840 20 20 } 21 21 22 $t = new lime_test( 29, new lime_output_color());22 $t = new lime_test(32, new lime_output_color()); 23 23 24 24 $context = sfContext::getInstance(array('controller' => 'myController')); … … 47 47 $t->is(button_to('test','', array('query_string' => 'foo=bar')), '<input value="test" type="button" onclick="document.location.href=\'module/action?foo=bar\';" />', 'button_to() returns an HTML "input" tag'); 48 48 $t->is(button_to('test','', array('popup' => 'true', 'query_string' => 'foo=bar')), '<input value="test" type="button" onclick="var w=window.open(\'module/action?foo=bar\');w.focus();return false;" />', 'button_to() returns an HTML "input" tag'); 49 $t->is(button_to('test','', 'popup=true'), '<input value="test" type="button" onclick="var w=window.open(\'module/action\');w.focus();return false;" />', 'button_to() accepts options as string'); 50 $t->is(button_to('test','', 'confirm=really?'), '<input value="test" type="button" onclick="if (confirm(\'really?\')) { return document.location.href=\'module/action\';} else return false;" />', 'button_to() works with confirm option'); 51 $t->is(button_to('test','', 'popup=true confirm=really?'), '<input value="test" type="button" onclick="if (confirm(\'really?\')) { var w=window.open(\'module/action\');w.focus(); };return false;" />', 'button_to() works with confirm and popup option'); 49 52 50 53 class testObject