protected function TestBase::assertNull in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/simpletest/src/TestBase.php \Drupal\simpletest\TestBase::assertNull()
Check to see if a value is NULL.
Parameters
$value: The value on which the assertion is to be done.
$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 if the assertion succeeded, FALSE otherwise.
75 calls to TestBase::assertNull()
- AliasTest::testWhitelist in core/
modules/ system/ src/ Tests/ Path/ AliasTest.php - Tests the alias whitelist.
- BookUninstallTest::testBookUninstall in core/
modules/ book/ src/ Tests/ BookUninstallTest.php - Tests the book_system_info_alter() method.
- BulkFormAccessTest::testNodeDeleteAccess in core/
modules/ node/ src/ Tests/ Views/ BulkFormAccessTest.php - Tests if nodes that may not be deleted, can not be deleted in bulk.
- BulkFormAccessTest::testUserDeleteAccess in core/
modules/ user/ src/ Tests/ Views/ BulkFormAccessTest.php - Tests if users that may not be deleted, can not be deleted in bulk.
- BulkFormTest::testBulkDeletion in core/
modules/ node/ src/ Tests/ Views/ BulkFormTest.php - Test multiple deletion.
File
- core/
modules/ simpletest/ src/ TestBase.php, line 628 - Contains \Drupal\simpletest\TestBase.
Class
- TestBase
- Base class for Drupal tests.
Namespace
Drupal\simpletestCode
protected function assertNull($value, $message = '', $group = 'Other') {
return $this
->assert(!isset($value), $message ? $message : SafeMarkup::format('Value @value is NULL.', array(
'@value' => var_export($value, TRUE),
)), $group);
}