public function DraggableviewsTest::setUp in DraggableViews 2.0.x
Same name and namespace in other branches
- 8 tests/src/Functional/DraggableviewsTest.php \Drupal\Tests\draggableviews\Functional\DraggableviewsTest::setUp()
Overrides BrowserTestBase::setUp
File
- tests/
src/ Functional/ DraggableviewsTest.php, line 35
Class
- DraggableviewsTest
- Tests sortability of Draggableviewws.
Namespace
Drupal\Tests\draggableviews\FunctionalCode
public function setUp() {
parent::setUp();
// Create users.
$this->adminUser = $this
->drupalCreateUser([
'access administration pages',
'view the administration theme',
'administer permissions',
'administer nodes',
'administer content types',
'access draggableviews',
]);
$this->authUser = $this
->drupalCreateUser([], 'authuser');
// Gather the test data.
$dataContent = $this
->providerTestDataContent();
// Create nodes.
foreach ($dataContent as $datumContent) {
$node = $this
->drupalCreateNode([
'type' => 'draggableviews_demo',
'title' => $datumContent[0],
]);
$node
->save();
}
}