function StyleSummaryTest::setUp
Same name in other branches
- 9 core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php \Drupal\Tests\views\Functional\Plugin\StyleSummaryTest::setUp()
- 10 core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php \Drupal\Tests\views\Functional\Plugin\StyleSummaryTest::setUp()
- 11.x core/modules/views/tests/src/Functional/Plugin/StyleSummaryTest.php \Drupal\Tests\views\Functional\Plugin\StyleSummaryTest::setUp()
Overrides ViewTestBase::setUp
File
-
core/
modules/ views/ tests/ src/ Functional/ Plugin/ StyleSummaryTest.php, line 38
Class
- StyleSummaryTest
- Tests the summary style plugin.
Namespace
Drupal\Tests\views\Functional\PluginCode
protected function setUp($import_test_views = TRUE) {
parent::setUp($import_test_views);
// Create 5 entities per bundle, to allow a summary overview per bundle.
for ($i = 0; $i < 5; $i++) {
for ($j = 0; $j < 5; $j++) {
$this->entities[] = $entity = EntityTest::create([
'name' => 'Entity ' . ($i * 5 + $j),
'type' => 'type' . $i,
]);
$entity->save();
}
}
$views_user = $this->drupalCreateUser([
'administer views',
]);
$this->drupalLogin($views_user);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.