/**
* {@inheritdoc}
*
* Create nodes with relative date range of:
* yesterday - today, today - today, and today - tomorrow.
*/
protected function setUp($import_test_views = TRUE
): void
{ parent::
setUp($import_test_views);
// Set to 'today'.
static::
$date =
$this->
getUTCEquivalentOfUserNowAsTimestamp();
// Change field storage to date-only.
$storage = FieldStorageConfig::
load('node.' .
static::
$fieldName);
$storage->
setSetting('datetime_type', DateRangeItem::DATETIME_TYPE_DATE
);
$storage->
save();
// Retrieve tomorrow, today and yesterday dates.
$dates =
$this->
getRelativeDateValuesFromTimestamp(static::
$date);
// Node 0: Yesterday - Today.
$node = Node::
create([