protected function SchedulerApiTest::setUp in Scheduler 8
Overrides SchedulerBrowserTestBase::setUp
File
- tests/
src/ Functional/ SchedulerApiTest.php, line 28
Class
- SchedulerApiTest
- Tests the API of the Scheduler module.
Namespace
Drupal\Tests\scheduler\FunctionalCode
protected function setUp() : void {
parent::setUp();
// Load the custom node type. It will be enabled for Scheduler automatically
// as that is pre-configured in node.type.scheduler_api_test.yml.
$this->customName = 'scheduler_api_test';
$this->customNodetype = NodeType::load($this->customName);
// Check that the custom node type has loaded OK.
$this
->assertNotNull($this->customNodetype, 'Custom node type "' . $this->customName . '" was created during install');
// Create a web user for this content type.
$this->webUser = $this
->drupalCreateUser([
'create ' . $this->customName . ' content',
'edit any ' . $this->customName . ' content',
'schedule publishing of nodes',
]);
}