function setUp() { parent::setUp(); $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); $this->addCommentsToNode(); $this->webUser = $this->drupalCreateUser(['create article content', 'access comments', 'post comments', 'skip comment approval']); }
/** * {@inheritDoc} */ protected function setUp() { parent::setUp(); $this->setKeys(TRUE); $this->assertValidKeys(); $this->setProtection('mollom_test_post_form', FormInterface::MOLLOM_MODE_CAPTCHA); }
function setUp() { parent::setUp(); $this->setKeys(); $this->assertValidKeys(); $this->adminUser = $this->drupalCreateUser(); }
public function setUp() { parent::setUp(); $this->setKeys(TRUE); $this->assertValidKeys(); $this->setProtection('mollom_test_post_form', FormInterface::MOLLOM_MODE_ANALYSIS); }
public function setUp() { parent::setUp(); $this->setKeys(); $this->assertValidKeys(); $this->adminUser = $this->drupalCreateUser(['access administration pages', 'administer mollom']); }
function setUp() { parent::setUp(); // Setup valid testing API keys. $this->setKeys(); $this->assertValidKeys(); $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article')); }
function setUp() { parent::setUp(); $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']); // @todo 'view own unpublished content' permission required to prevent a // bogus access denied watchdog caused by a bug in Drupal core. // @see http://drupal.org/node/1429442 $this->webUser = $this->drupalCreateUser(['create article content', 'view own unpublished content']); }
function setUp() { parent::setUp(); $this->settings = \Drupal::configFactory()->getEditable('mollom.settings'); $this->settings->set('test_mode.enabled', FALSE)->save(); $this->getClient(TRUE); // Enable testing mode warnings. \Drupal::state()->set('mollom.omit_warning', FALSE); $this->adminUser = $this->drupalCreateUser(array('access administration pages', 'administer mollom')); }
function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); $this->setProtectionUI('user_register_form', FormInterface::MOLLOM_MODE_CAPTCHA); $this->drupalLogout(); // Allow visitors to register. // Disable e-mail verification. // Set default user account cancellation method. $config = $this->config('user.settings'); $config->set('verify_mail', FALSE)->set('register', USER_REGISTER_VISITORS)->set('cancel_method', 'user_cancel_delete')->save(); }
function setUp() { parent::setUp(); $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article']); $this->addCommentsToNode(); $this->webUser = $this->drupalCreateUser(['create article content', 'access comments', 'post comments', 'skip comment approval']); $this->drupalLogin($this->adminUser); $this->setProtectionUI('node_article_form'); $this->setProtectionUI('comment_comment_form'); $this->drupalLogout(); // Login and submit a few nodes. $this->nodes = array(); $this->comments = array(); $this->drupalLogin($this->webUser); for ($i = 0; $i < 2; $i++) { // Create a test node. $edit = ['title[0][value]' => 'ham node ' . $i]; $this->drupalPostForm('node/add/article', $edit, t('Save')); $node = $this->drupalGetNodeByTitle($edit['title[0][value]']); $this->drupalGet('node/' . $node->id()); $edit = ['comment_body[0][value]' => 'ham']; $this->drupalPostForm(NULL, $edit, t('Save')); } }
function setUp() { parent::setUp(); $this->adminUser = $this->drupalCreateUser(['access administration pages', 'administer site configuration', 'administer modules', 'administer permissions']); $this->webUser = $this->drupalCreateUser([]); }
function setUp() { parent::setUp(); \Drupal::configFactory()->getEditable('mollom.settings')->set('test_mode.enabled', FALSE)->save(); }
public function setUp() { parent::setUp(); $this->drupalLogin($this->adminUser); }
function setUp() { parent::setUp(); $this->setKeys(); }