Adding test for form->submit() and timestamps.

Conflicts:

	lib/Cake/Test/Case/View/Helper/FormHelperTest.php
This commit is contained in:
mark_story 2011-10-19 21:47:55 -04:00
parent 30504ef32b
commit edfb0884c8

View file

@ -6009,6 +6009,23 @@ class FormHelperTest extends CakeTestCase {
$this->assertEquals(array('save'), $result, 'Only submits with name attributes should be unlocked.');
}
/**
* Test submit image with timestamps.
*
* @return void
*/
function testSubmitImageTimestamp() {
Configure::write('Asset.timestamp', 'force');
$result = $this->Form->submit('cake.power.gif');
$expected = array(
'div' => array('class' => 'submit'),
'input' => array('type' => 'image', 'src' => 'preg:/img\/cake\.power\.gif\?\d*/'),
'/div'
);
$this->assertTags($result, $expected);
}
/**
* test the create() method
*