You are here

function ForumAccess12DefaultConfigurationTestCase::testAccess2 in Forum Access 7

File

tests/forum_access.test, line 168

Class

ForumAccess12DefaultConfigurationTestCase
Default configuration test for the Forum Access module.

Code

function testAccess2() {
  $this
    ->setUp2();
  taxonomy_term_delete(1);
  $this
    ->pass('#########################<br />#2 - START Default Configuration test @' . (time() - $this->time), '<a id="jump1" href="#jump2">/\\<br />######<br />\\/</a>');

  // Create a forum with default settings.

  //$this->drupalGet('admin/structure/forum/add/forum');

  //$this->assertResponse(200);
  $edit = array(
    'name' => 'Forum 2 (Default)',
    'description' => 'Default settings',
    'parent[0]' => 0,
    'weight' => '0',
  );
  $forum = (object) ($edit + array(
    'tid' => 2,
  ));

  // Create forum.
  $this
    ->drupalPost('admin/structure/forum/add/forum', $edit, t('Save'));
  $this
    ->assertResponse(200, "{$forum->name} added.");
  $this
    ->drupalGet("admin/structure/forum/edit/forum/{$forum->tid}");
  $this
    ->assertResponse(200, "^^^ {$forum->name} exists, with these settings.");
  $this
    ->drupalGet('forum');
  $this
    ->assertResponse(200, 'Forum Overview');
  $this
    ->checkForum($forum, TRUE);
  $this
    ->pass('#########################<br />#2 - END Default Configuration test @' . (time() - $this->time), '<a id="jump2" href="#jump3">/\\<br />######<br />\\/</a>');
}