protected function DateRecurViewsFieldTest::setUp in Recurring Dates Field 3.1.x
Same name and namespace in other branches
- 8.2 tests/src/Kernel/DateRecurViewsFieldTest.php \Drupal\Tests\date_recur\Kernel\DateRecurViewsFieldTest::setUp()
- 3.x tests/src/Kernel/DateRecurViewsFieldTest.php \Drupal\Tests\date_recur\Kernel\DateRecurViewsFieldTest::setUp()
- 3.0.x tests/src/Kernel/DateRecurViewsFieldTest.php \Drupal\Tests\date_recur\Kernel\DateRecurViewsFieldTest::setUp()
Parameters
bool $import_test_views: Should the views specified on the test class be imported. If you need to setup some additional stuff, like fields, you need to call false and then call createTestViews for your own.
Overrides ViewsKernelTestBase::setUp
1 call to DateRecurViewsFieldTest::setUp()
- DateRecurViewsFieldAttachedTest::setUp in tests/
src/ Kernel/ DateRecurViewsFieldAttachedTest.php
1 method overrides DateRecurViewsFieldTest::setUp()
- DateRecurViewsFieldAttachedTest::setUp in tests/
src/ Kernel/ DateRecurViewsFieldAttachedTest.php
File
- tests/
src/ Kernel/ DateRecurViewsFieldTest.php, line 67
Class
- DateRecurViewsFieldTest
- Tests the results of 'date_recur_date' field plugin.
Namespace
Drupal\Tests\date_recur\KernelCode
protected function setUp($import_test_views = TRUE) {
parent::setUp(FALSE);
$this
->installEntitySchema('dr_entity_test');
ViewTestData::createTestViews(get_class($this), [
'date_recur_views_test',
]);
$this->map = [
'id' => 'id',
];
// This is the name of the pre-installed base field.
$this->fieldName = 'dr';
$this->entityType = 'dr_entity_test';
$user = User::create([
'uid' => 2,
'timezone' => 'Australia/Sydney',
]);
$this->container
->get('current_user')
->setAccount($user);
}