protected function FieldCounterTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/rest/tests/src/Functional/Views/FieldCounterTest.php \Drupal\Tests\rest\Functional\Views\FieldCounterTest::setUp()
Overrides ViewTestBase::setUp
File
- core/
modules/ rest/ tests/ src/ Functional/ Views/ FieldCounterTest.php, line 51
Class
- FieldCounterTest
- Tests the display of counter field.
Namespace
Drupal\Tests\rest\Functional\ViewsCode
protected function setUp($import_test_views = TRUE) {
parent::setUp($import_test_views);
ViewTestData::createTestViews(get_class($this), [
'rest_test_views',
]);
// Create some test content.
for ($i = 1; $i <= 10; $i++) {
Node::create([
'type' => 'article',
'title' => 'Article test ' . $i,
])
->save();
}
$this
->enableViewsTestModule();
$this->view = Views::getView('test_field_counter_display');
$this->view
->setDisplay('rest_export_1');
}