1 redirect.test RedirectFunctionalTest::testNodeRedirectForm()

Tests presence or absence of Redirect elements on node edit forms.

File

core/modules/redirect/tests/redirect.test, line 280
Unit tests for the redirect module.

Class

RedirectFunctionalTest

Code

function testNodeRedirectForm() {
  // Ensure that the redirect form is not present on node/add
  $this->backdropGet('node/add');
  $this->assertNoLink('Add URL redirect to this node');

  // Ensure that the redirect form is present on node/[nid]/edit
  $node = $this->backdropCreateNode(array('type' => 'post'));
  $this->backdropGet('node/' . $node->nid . '/edit');
  $this->assertLink('Add URL redirect to this node');
}