function CommentTestBase::setCommentAnonymous

Sets the value governing restrictions on anonymous comments.

Parameters

integer $level: The level of the contact information allowed for anonymous comments:

  • 0: No contact information allowed.
  • 1: Contact information allowed but not required.
  • 2: Contact information required.
5 calls to CommentTestBase::setCommentAnonymous()
CommentAnonymousTest::testAnonymous in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentAnonymousTest.php
Tests anonymous comment functionality.
CommentApprovalTest::testApprovalAdminInterface in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentApprovalTest.php
Test comment approval functionality through admin/content/comment.
CommentApprovalTest::testApprovalNodeInterface in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentApprovalTest.php
Tests comment approval functionality through the node interface.
CommentAttributesTest::setUp in drupal/core/modules/rdf/lib/Drupal/rdf/Tests/CommentAttributesTest.php
Sets up a Drupal site for running functional and integration tests.
CommentStatisticsTest::testCommentNodeCommentStatistics in drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentStatisticsTest.php
Tests the node comment statistics.

File

drupal/core/modules/comment/lib/Drupal/comment/Tests/CommentTestBase.php, line 245
Contains Drupal\comment\Tests\CommentTestBase.

Class

CommentTestBase
Provides setup and helper methods for comment tests.

Namespace

Drupal\comment\Tests

Code

function setCommentAnonymous($level) {
  $this
    ->setCommentSettings('comment_anonymous', $level, format_string('Anonymous commenting set to level @level.', array(
    '@level' => $level,
  )));
}