Skip to content

Commit

Permalink
Adding test for form->submit() and timestamps.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 20, 2011
1 parent 76e6452 commit 4e37c79
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cake/tests/cases/libs/view/helpers/form.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -5653,6 +5653,23 @@ function testSubmitImage() {
$this->assertTags($result, $expected);
}

/**
* 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
*
Expand Down

0 comments on commit 4e37c79

Please sign in to comment.