function MonthDatePluginTest::setUp
Same name in other branches
- 8.9.x core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php \Drupal\Tests\views\Functional\Plugin\MonthDatePluginTest::setUp()
- 10 core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php \Drupal\Tests\views\Functional\Plugin\MonthDatePluginTest::setUp()
- 11.x core/modules/views/tests/src/Functional/Plugin/MonthDatePluginTest.php \Drupal\Tests\views\Functional\Plugin\MonthDatePluginTest::setUp()
Overrides ViewTestBase::setUp
File
-
core/
modules/ views/ tests/ src/ Functional/ Plugin/ MonthDatePluginTest.php, line 51
Class
- MonthDatePluginTest
- Tests the Month Date Plugin.
Namespace
Drupal\Tests\views\Functional\PluginCode
public function setUp($import_test_views = TRUE, $modules = [
'views_test_config',
]) : void {
parent::setUp($import_test_views, $modules);
$utc = new \DateTimeZone('UTC');
$format = 'Y-m-d h:i:s';
$this->node1 = $this->drupalCreateNode([
'created' => \DateTime::createFromFormat($format, '2020-10-01 00:00:00', $utc)->getTimestamp(),
]);
$this->node2 = $this->drupalCreateNode([
'created' => \DateTime::createFromFormat($format, '2020-11-01 00:00:00', $utc)->getTimestamp(),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.