function BlockFormInBlockTest::testPlaceholders

Same name in other branches
  1. 9 core/modules/block/tests/src/Functional/BlockFormInBlockTest.php \Drupal\Tests\block\Functional\BlockFormInBlockTest::testPlaceholders()
  2. 8.9.x core/modules/block/tests/src/Functional/BlockFormInBlockTest.php \Drupal\Tests\block\Functional\BlockFormInBlockTest::testPlaceholders()
  3. 11.x core/modules/block/tests/src/Functional/BlockFormInBlockTest.php \Drupal\Tests\block\Functional\BlockFormInBlockTest::testPlaceholders()

Tests the actual placeholders.

File

core/modules/block/tests/src/Functional/BlockFormInBlockTest.php, line 70

Class

BlockFormInBlockTest
Tests form in block caching.

Namespace

Drupal\Tests\block\Functional

Code

public function testPlaceholders() : void {
    $this->drupalGet('test-multiple-forms');
    $placeholder = 'form_action_' . Crypt::hashBase64('Drupal\\Core\\Form\\FormBuilder::prepareForm');
    $this->assertSession()
        ->pageTextContains('Form action: ' . $placeholder);
}

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