function TestBase::pass

Fire an assertion that is always positive.

Parameters

$message: (optional) A message to display with the assertion. Do not translate messages: use \Drupal\Component\Render\FormattableMarkup to embed variables in the message text, not t(). If left blank, a default message will be displayed.

$group: (optional) The group this message is in, which is displayed in a column in test output. Use 'Debug' to indicate this is debugging output. Do not translate this string. Defaults to 'Other'; most tests do not override this default.

Return value

TRUE.

22 calls to TestBase::pass()
BrokenSetUpTest::setUp in core/modules/simpletest/src/Tests/BrokenSetUpTest.php
Sets up a Drupal site for running functional and integration tests.
BrokenSetUpTest::tearDown in core/modules/simpletest/src/Tests/BrokenSetUpTest.php
Cleans up after testing.
BrokenSetUpTest::testMethod in core/modules/simpletest/src/Tests/BrokenSetUpTest.php
Runs this test case from within the simpletest child site.
CommentTestBase::setCommentSettings in core/modules/comment/src/Tests/CommentTestBase.php
Sets a comment settings variable for the article content type.
CommentTestBase::setCommentSubject in core/modules/comment/src/Tests/CommentTestBase.php
Sets the value governing whether the subject field should be enabled.

... See full list

File

core/modules/simpletest/src/TestBase.php, line 793

Class

TestBase
Base class for Drupal tests.

Namespace

Drupal\simpletest

Code

protected function pass($message = NULL, $group = 'Other') {
    return $this->assert(TRUE, $message, $group);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.