public function WebformViewsTestBase::setUp in Webform Views Integration 8.5
Overrides KernelTestBase::setUp
1 call to WebformViewsTestBase::setUp()
- EntityAutocompleteWebformViewsTest::setUp in tests/
src/ Kernel/ relationship/ EntityAutocompleteWebformViewsTest.php
1 method overrides WebformViewsTestBase::setUp()
- EntityAutocompleteWebformViewsTest::setUp in tests/
src/ Kernel/ relationship/ EntityAutocompleteWebformViewsTest.php
File
- tests/
src/ Kernel/ WebformViewsTestBase.php, line 80
Class
- WebformViewsTestBase
- Reasonable starting point for testing integration between webform and views.
Namespace
Drupal\Tests\webform_views\KernelCode
public function setUp() {
parent::setUp();
$this
->installSchema('system', [
'sequences',
]);
$this
->installSchema('user', [
'users_data',
]);
$this
->installSchema('webform', [
'webform',
]);
$this
->installConfig([
'user',
'views',
'webform',
'webform_views',
'webform_views_test',
]);
$this
->installEntitySchema('user');
$this
->installEntitySchema('webform_submission');
$account = User::create([
'name' => $this
->randomString(),
'mail' => 'admin@example.com',
'pass' => 1,
'roles' => [
'administrator',
],
]);
$account
->save();
\Drupal::currentUser()
->setAccount($account);
}