Browse Source

Add missing coverage for attributes with secure().

Mark Story 12 years ago
parent
commit
9201375dd1
1 changed files with 4 additions and 2 deletions
  1. 4 2
      tests/TestCase/View/Helper/FormHelperTest.php

+ 4 - 2
tests/TestCase/View/Helper/FormHelperTest.php

@@ -1170,7 +1170,7 @@ class FormHelperTest extends TestCase {
 		);
 		$this->assertEquals($expected, $result);
 
-		$result = $this->Form->secure($expected);
+		$result = $this->Form->secure($expected, ['data-foo' => 'bar']);
 
 		$hash = '2981c38990f3f6ba935e6561dc77277966fabd6d%3AAddresses.id';
 		$expected = array(
@@ -1178,12 +1178,14 @@ class FormHelperTest extends TestCase {
 			array('input' => array(
 				'type' => 'hidden',
 				'name' => '_Token[fields]',
-				'value' => $hash
+				'value' => $hash,
+				'data-foo' => 'bar',
 			)),
 			array('input' => array(
 				'type' => 'hidden',
 				'name' => '_Token[unlocked]',
 				'value' => 'address%7Cfirst_name',
+				'data-foo' => 'bar',
 			)),
 			'/div'
 		);