You are here

protected function TestBase::pass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/simpletest/src/TestBase.php \Drupal\simpletest\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\Utility\SafeMarkup::format() 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.

150 calls to TestBase::pass()
AccountSwitcherTest::testAccountSwitching in core/modules/system/src/Tests/Session/AccountSwitcherTest.php
ApcuBackendUnitTest::requirementsFail in core/modules/system/src/Tests/Cache/ApcuBackendUnitTest.php
Check if requirements fail.
BlockContentCreationTest::testFailedBlockCreation in core/modules/block_content/src/Tests/BlockContentCreationTest.php
Verifies that a transaction rolls back the failed creation.
BlockContentTranslationUITest::doTestBasicTranslation in core/modules/block_content/src/Tests/BlockContentTranslationUITest.php
Tests the basic translation workflow.
BlockViewBuilderTest::assertBlockRenderedWithExpectedCacheability in core/modules/block/src/Tests/BlockViewBuilderTest.php
Asserts that a block is built/rendered/cached with expected cacheability.

... See full list

File

core/modules/simpletest/src/TestBase.php, line 886
Contains \Drupal\simpletest\TestBase.

Class

TestBase
Base class for Drupal tests.

Namespace

Drupal\simpletest

Code

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