public function WebformBlockCacheTest::setUp in Webform 8.5
Same name and namespace in other branches
- 6.x tests/src/Functional/WebformBlockCacheTest.php \Drupal\Tests\webform\Functional\WebformBlockCacheTest::setUp()
Overrides WebformBrowserTestBase::setUp
File
- tests/
src/ Functional/ WebformBlockCacheTest.php, line 32
Class
- WebformBlockCacheTest
- These tests proof that the webform block which renders the webform as a block provides the correct cache tags / cache contexts so that cachability works.
Namespace
Drupal\Tests\webform\FunctionalCode
public function setUp() {
parent::setUp();
$this->authenticatedUser = $this
->createUser([
'access content',
]);
$this
->createContentType([
'type' => 'page',
]);
Node::create([
'title' => $this
->randomString(),
'type' => 'page',
])
->save();
$this
->drupalPlaceBlock('webform_block', [
'webform_id' => 'contact',
'region' => 'footer',
])
->save();
}