protected function RangeViewsArgumentTest::setUp in Range 8
Overrides RangeViewsTestBase::setUp
File
- tests/
src/ Functional/ Views/ RangeViewsArgumentTest.php, line 22
Class
- RangeViewsArgumentTest
- Tests the range views argument handler.
Namespace
Drupal\Tests\range\Functional\ViewsCode
protected function setUp($import_test_views = TRUE) : void {
parent::setUp($import_test_views);
// Add some basic test nodes.
$ranges = [
[
'from' => 0,
'to' => 10,
],
[
'from' => 5,
'to' => 9,
],
[
'from' => -5,
'to' => 15,
],
[
'from' => -10,
'to' => 5,
],
];
foreach ($ranges as $range) {
$this->nodes[] = $this
->drupalCreateNode([
'type' => $this->bundle,
$this->fieldName => $range,
]);
}
}