Exemplo n.º 1
0
 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']);
 }
Exemplo n.º 2
0
 /**
  * {@inheritDoc}
  */
 protected function setUp()
 {
     parent::setUp();
     $this->setKeys(TRUE);
     $this->assertValidKeys();
     $this->setProtection('mollom_test_post_form', FormInterface::MOLLOM_MODE_CAPTCHA);
 }
Exemplo n.º 3
0
 function setUp()
 {
     parent::setUp();
     $this->setKeys();
     $this->assertValidKeys();
     $this->adminUser = $this->drupalCreateUser();
 }
Exemplo n.º 4
0
 public function setUp()
 {
     parent::setUp();
     $this->setKeys(TRUE);
     $this->assertValidKeys();
     $this->setProtection('mollom_test_post_form', FormInterface::MOLLOM_MODE_ANALYSIS);
 }
Exemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     $this->setKeys();
     $this->assertValidKeys();
     $this->adminUser = $this->drupalCreateUser(['access administration pages', 'administer mollom']);
 }
Exemplo n.º 6
0
 function setUp()
 {
     parent::setUp();
     // Setup valid testing API keys.
     $this->setKeys();
     $this->assertValidKeys();
     $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
 }
Exemplo n.º 7
0
 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']);
 }
Exemplo n.º 8
0
 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'));
 }
Exemplo n.º 9
0
 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();
 }
Exemplo n.º 10
0
 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'));
     }
 }
Exemplo n.º 11
0
 function setUp()
 {
     parent::setUp();
     $this->adminUser = $this->drupalCreateUser(['access administration pages', 'administer site configuration', 'administer modules', 'administer permissions']);
     $this->webUser = $this->drupalCreateUser([]);
 }
Exemplo n.º 12
0
 function setUp()
 {
     parent::setUp();
     \Drupal::configFactory()->getEditable('mollom.settings')->set('test_mode.enabled', FALSE)->save();
 }
Exemplo n.º 13
0
 public function setUp()
 {
     parent::setUp();
     $this->drupalLogin($this->adminUser);
 }
Exemplo n.º 14
0
 function setUp()
 {
     parent::setUp();
     $this->setKeys();
 }