function TestController::testMethod

Same name in this branch
  1. 8.9.x core/modules/system/tests/modules/csrf_test/src/Controller/TestController.php \Drupal\csrf_test\Controller\TestController::testMethod()
Same name in other branches
  1. 9 core/modules/system/tests/modules/csrf_test/src/Controller/TestController.php \Drupal\csrf_test\Controller\TestController::testMethod()
  2. 9 core/modules/system/tests/modules/csrf_race_test/src/Controller/TestController.php \Drupal\csrf_race_test\Controller\TestController::testMethod()
  3. 10 core/modules/system/tests/modules/csrf_test/src/Controller/TestController.php \Drupal\csrf_test\Controller\TestController::testMethod()
  4. 10 core/modules/system/tests/modules/csrf_race_test/src/Controller/TestController.php \Drupal\csrf_race_test\Controller\TestController::testMethod()
  5. 11.x core/modules/system/tests/modules/csrf_test/src/Controller/TestController.php \Drupal\csrf_test\Controller\TestController::testMethod()
  6. 11.x core/modules/system/tests/modules/csrf_race_test/src/Controller/TestController.php \Drupal\csrf_race_test\Controller\TestController::testMethod()

Helper page to load jQuery in test.

Return value

array Empty page with jQuery.

1 string reference to 'TestController::testMethod'
csrf_race_test.routing.yml in core/modules/system/tests/modules/csrf_race_test/csrf_race_test.routing.yml
core/modules/system/tests/modules/csrf_race_test/csrf_race_test.routing.yml

File

core/modules/system/tests/modules/csrf_race_test/src/Controller/TestController.php, line 44

Class

TestController
Controller to test concurrent CSRF token generation.

Namespace

Drupal\csrf_race_test\Controller

Code

public function testMethod() {
    return [
        '#markup' => '',
        '#attached' => [
            'library' => 'core/jquery',
        ],
    ];
}

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