You are here

public function CommentTestBase::setCommentsPerPage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/comment/src/Tests/CommentTestBase.php \Drupal\comment\Tests\CommentTestBase::setCommentsPerPage()

Sets the value specifying the default number of comments per page.

Parameters

int $number: Comments per page value.

string $field_name: (optional) Field name through which the comment should be posted. Defaults to 'comment'.

6 calls to CommentTestBase::setCommentsPerPage()
CommentBlockTest::testRecentCommentBlock in core/modules/comment/src/Tests/CommentBlockTest.php
Tests the recent comments block.
CommentInterfaceTest::testCommentInterface in core/modules/comment/src/Tests/CommentInterfaceTest.php
Tests the comment interface.
CommentPagerTest::testCommentNewPageIndicator in core/modules/comment/src/Tests/CommentPagerTest.php
Tests calculation of first page with new comment.
CommentPagerTest::testCommentOrderingThreading in core/modules/comment/src/Tests/CommentPagerTest.php
Tests comment ordering and threading.
CommentPagerTest::testCommentPaging in core/modules/comment/src/Tests/CommentPagerTest.php
Confirms comment paging works correctly with flat and threaded comments.

... See full list

File

core/modules/comment/src/Tests/CommentTestBase.php, line 310
Contains \Drupal\comment\Tests\CommentTestBase.

Class

CommentTestBase
Provides setup and helper methods for comment tests.

Namespace

Drupal\comment\Tests

Code

public function setCommentsPerPage($number, $field_name = 'comment') {
  $this
    ->setCommentSettings('per_page', $number, format_string('Number of comments per page set to @number.', array(
    '@number' => $number,
  )), $field_name);
}