protected function DateRecurModularOscarTest::setUp in Recurring Date Field Modular Widgets 8
Same name and namespace in other branches
- 3.x tests/src/Functional/DateRecurModularOscarTest.php \Drupal\Tests\date_recur_modular\Functional\DateRecurModularOscarTest::setUp()
- 2.x tests/src/Functional/DateRecurModularOscarTest.php \Drupal\Tests\date_recur_modular\Functional\DateRecurModularOscarTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ DateRecurModularOscarTest.php, line 36
Class
- DateRecurModularOscarTest
- Tests Oscar Widget.
Namespace
Drupal\Tests\date_recur_modular\FunctionalCode
protected function setUp() : void {
parent::setUp();
// @todo replace in 8.8: See 2835616.
$display = \entity_get_form_display('dr_entity_test', 'dr_entity_test', 'default');
$component = $display
->getComponent('dr');
$component['region'] = 'content';
$component['type'] = 'date_recur_modular_oscar';
$component['settings'] = [];
$display
->setComponent('dr', $component);
$display
->save();
$user = $this
->drupalCreateUser([
'administer entity_test content',
]);
$user->timezone = 'Asia/Singapore';
$user
->save();
$this
->drupalLogin($user);
}