/** * {@inheritdoc} */ public function setUp() { parent::setUp(); // Load the custom node type and check it . $this->custom_type = 'scheduler_api_test'; $this->nodetype = NodeType::load($this->custom_type); if ($this->nodetype) { $this->pass('Custom node type ' . $this->custom_type . ' "' . $this->nodetype->get('name') . '" created during install'); // Do not need to enable this node type for scheduler as that is already // pre-configured in node.type.scheduler_api_test.yml } else { $this->fail('*** Custom node type ' . $this->custom_type . ' does not exist. Testing abandoned ***'); return; } // Create a web user for this content type. $this->webUser = $this->drupalCreateUser(['create ' . $this->custom_type . ' content', 'edit any ' . $this->custom_type . ' content', 'schedule publishing of nodes']); // Create node_storage property. $this->node_storage = $this->container->get('entity.manager')->getStorage('node'); }
/** * {@inheritdoc} */ public function setUp() { parent::setUp(); $this->routeCronForm = Url::fromRoute('scheduler.cron_form'); }