protected function ModerationDashboardTestBase::setUp in Moderation Dashboard 2.0.x
Same name and namespace in other branches
- 8 tests/src/Functional/ModerationDashboardTestBase.php \Drupal\Tests\moderation_dashboard\Functional\ModerationDashboardTestBase::setUp()
Throws
\Drupal\Core\Entity\EntityStorageException
Overrides BrowserTestBase::setUp
3 calls to ModerationDashboardTestBase::setUp()
- ModerationDashboardComponentsTest::setUp in tests/
src/ Functional/ ModerationDashboardComponentsTest.php - ModerationDashboardPersonalizedComponentsTest::setUp in tests/
src/ Functional/ ModerationDashboardPersonalizedComponentsTest.php - ModerationDashboardRedirectTest::setUp in tests/
src/ Functional/ ModerationDashboardRedirectTest.php
3 methods override ModerationDashboardTestBase::setUp()
- ModerationDashboardComponentsTest::setUp in tests/
src/ Functional/ ModerationDashboardComponentsTest.php - ModerationDashboardPersonalizedComponentsTest::setUp in tests/
src/ Functional/ ModerationDashboardPersonalizedComponentsTest.php - ModerationDashboardRedirectTest::setUp in tests/
src/ Functional/ ModerationDashboardRedirectTest.php
File
- tests/
src/ Functional/ ModerationDashboardTestBase.php, line 71
Class
- ModerationDashboardTestBase
- Defines a base class for testing Moderation Dashboard module.
Namespace
Drupal\Tests\moderation_dashboard\FunctionalCode
protected function setUp() {
parent::setUp();
// Create content types for tests.
foreach ($this->testNodeTypes as $node_type_properties) {
$this
->drupalCreateContentType($node_type_properties);
}
// Create editorial workflow.
$this->editorialWorkflow = $this
->createEditorialWorkflow();
if ($this->setEditorialWorkflow) {
foreach ($this->testNodeTypes as $node_type_properties) {
$this->editorialWorkflow
->getTypePlugin()
->addEntityTypeAndBundle('node', $node_type_properties['type']);
}
$this->editorialWorkflow
->save();
}
// Create test user.
$this->user = $this
->createUser($this->userPermissions, 'test user');
}