function CommentTestBase::setCommentAnonymous in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/comment/src/Tests/CommentTestBase.php \Drupal\comment\Tests\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.
7 calls to CommentTestBase::setCommentAnonymous()
- CommentAdminTest::testApprovalAdminInterface in core/
modules/ comment/ src/ Tests/ CommentAdminTest.php - Test comment approval functionality through admin/content/comment.
- CommentAdminTest::testApprovalNodeInterface in core/
modules/ comment/ src/ Tests/ CommentAdminTest.php - Tests comment approval functionality through the node interface.
- CommentAdminTest::testEditComment in core/
modules/ comment/ src/ Tests/ CommentAdminTest.php - Tests editing a comment as an admin.
- CommentAnonymousTest::testAnonymous in core/
modules/ comment/ src/ Tests/ CommentAnonymousTest.php - Tests anonymous comment functionality.
- CommentAttributesTest::setUp in core/
modules/ rdf/ src/ Tests/ CommentAttributesTest.php - Sets up a Drupal site for running functional and integration tests.
File
- core/
modules/ comment/ src/ Tests/ CommentTestBase.php, line 297 - Contains \Drupal\comment\Tests\CommentTestBase.
Class
- CommentTestBase
- Provides setup and helper methods for comment tests.
Namespace
Drupal\comment\TestsCode
function setCommentAnonymous($level) {
$this
->setCommentSettings('anonymous', $level, format_string('Anonymous commenting set to level @level.', array(
'@level' => $level,
)));
}