protected function RangeViewsFilterTest::setUp in Range 8
Overrides RangeViewsTestBase::setUp
File
- tests/
src/ Functional/ Views/ RangeViewsFilterTest.php, line 22
Class
- RangeViewsFilterTest
- Tests the range views filter 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,
]);
}
}