/** * Sets the test up. */ protected function setUp() { parent::setUp(); /** @var UserInterface $user */ $user = User::load(1); // Create initial block. $block = $this->createBlockContent('initial'); $blocks = array(); $logs = array(); // Get original block. $blocks[] = $block->getRevisionId(); $logs[] = ''; // Create three revisions. $revision_count = 3; for ($i = 0; $i < $revision_count; $i++) { $block->setNewRevision(TRUE); $block->setRevisionLogMessage($this->randomMachineName(32)); $block->setRevisionUser($this->adminUser); $block->setRevisionCreationTime(REQUEST_TIME); $logs[] = $block->getRevisionLogMessage(); $block->save(); $blocks[] = $block->getRevisionId(); } $this->blocks = $blocks; $this->revisionLogs = $logs; }
/** * Sets the test up. */ protected function setUp() { parent::setUp(); // Create initial block. $block = $this->createBlockContent('initial'); $blocks = array(); $logs = array(); // Get original block. $blocks[] = $block->getRevisionId(); $logs[] = ''; // Create three revisions. $revision_count = 3; for ($i = 0; $i < $revision_count; $i++) { $block->setNewRevision(TRUE); $block->setRevisionLog($this->randomMachineName(32)); $logs[] = $block->getRevisionLog(); $block->save(); $blocks[] = $block->getRevisionId(); } $this->blocks = $blocks; $this->revisionLogs = $logs; }
protected function setUp() { parent::setUp(); $this->drupalPlaceBlock('page_title_block'); }
/** * Sets the test up. */ protected function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); }