function FormValidationTestCase::testDisabledToken

Tests that a form with a disabled CSRF token can be validated.

File

modules/simpletest/tests/form.test, line 712

Class

FormValidationTestCase
Test form validation handlers.

Code

function testDisabledToken() {
    $this->drupalPost('form-test/validate-no-token', array(), 'Save');
    $this->assertText('The form_test_validate_no_token form has been submitted successfully.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.