1 system.test ConfirmFormTest::testConfirmForm()

Tests that the confirm form does not use external destinations.

File

core/modules/system/tests/system.test, line 2717
Tests for system.module.

Class

ConfirmFormTest
Tests confirm form destinations.

Code

function testConfirmForm() {
  $this->backdropGet('user/1/cancel');
  $this->assertCancelLinkUrl(url('user/1'));
  $this->backdropGet('user/1/cancel', array('query' => array('destination' => 'node')));
  $this->assertCancelLinkUrl(url('node'));
  $this->backdropGet('user/1/cancel', array('query' => array('destination' => 'http://example.com')));
  $this->assertCancelLinkUrl(url('user/1'));
}