@@ 7484-7496 (lines=13) @@ | ||
7481 | * |
|
7482 | * @return void |
|
7483 | */ |
|
7484 | public function testPostButtonNestedData() { |
|
7485 | $data = array( |
|
7486 | 'one' => array( |
|
7487 | 'two' => array( |
|
7488 | 3, 4, 5 |
|
7489 | ) |
|
7490 | ) |
|
7491 | ); |
|
7492 | $result = $this->Form->postButton('Send', '/', array('data' => $data)); |
|
7493 | $this->assertContains('<input type="hidden" name="data[one][two][0]" value="3"', $result); |
|
7494 | $this->assertContains('<input type="hidden" name="data[one][two][1]" value="4"', $result); |
|
7495 | $this->assertContains('<input type="hidden" name="data[one][two][2]" value="5"', $result); |
|
7496 | } |
|
7497 | ||
7498 | /** |
|
7499 | * Test that postButton adds _Token fields. |
|
@@ 7658-7670 (lines=13) @@ | ||
7655 | * |
|
7656 | * @return void |
|
7657 | */ |
|
7658 | public function testPostLinkNestedData() { |
|
7659 | $data = array( |
|
7660 | 'one' => array( |
|
7661 | 'two' => array( |
|
7662 | 3, 4, 5 |
|
7663 | ) |
|
7664 | ) |
|
7665 | ); |
|
7666 | $result = $this->Form->postLink('Send', '/', array('data' => $data)); |
|
7667 | $this->assertContains('<input type="hidden" name="data[one][two][0]" value="3"', $result); |
|
7668 | $this->assertContains('<input type="hidden" name="data[one][two][1]" value="4"', $result); |
|
7669 | $this->assertContains('<input type="hidden" name="data[one][two][2]" value="5"', $result); |
|
7670 | } |
|
7671 | ||
7672 | /** |
|
7673 | * test creating postLinks after a GET form. |