function ConfirmFormTest::testConfirmForm
Tests that the confirm form does not use external destinations.
File
-
modules/
system/ system.test, line 3186
Class
- ConfirmFormTest
- Tests confirm form destinations.
Code
function testConfirmForm() {
$this->drupalGet('user/1/cancel');
$this->assertCancelLinkUrl(url('user/1'));
$this->drupalGet('user/1/cancel', array(
'query' => array(
'destination' => 'node',
),
));
$this->assertCancelLinkUrl(url('node'));
$this->drupalGet('user/1/cancel', array(
'query' => array(
'destination' => 'http://example.com',
),
));
$this->assertCancelLinkUrl(url('user/1'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.