Skip to content
Permalink
Browse files

Add simple test cases.

  • Loading branch information...
Holt59 committed Jan 4, 2016
1 parent 256da43 commit 49ea70013b601e6266fc5ec323ea1102fcdcbd19
Showing with 24 additions and 0 deletions.
  1. +24 −0 tests/TestCase/View/Helper/FormHelperTest.php
@@ -581,6 +581,30 @@ public function testInputTemplateVars()
];
$this->assertHtml($expected, $result);
}
/**
* Test using template vars in submitContainer template.
*
* @return void
*/
public function testSubmitTemplateVars()
{
$this->Form->templates([
'submitContainer' => '<div class="submit">{{content}}{{forcontainer}}</div>'
]);
$result = $this->Form->submit('Submit', [
'templateVars' => [
'forcontainer' => 'in-container'
]
]);
$expected = [
'div' => ['class'],
'input' => ['type' => 'submit', 'value' => 'Submit'],
'in-container',
'/div',
];
$this->assertHtml($expected, $result);
}
/**
* test the create() method

0 comments on commit 49ea700

Please sign in to comment.
You can’t perform that action at this time.