function EntityCrudHookTestCase::assertHookMessage
Pass if the message $text was set by one of the CRUD hooks in entity_crud_hook_test.module, i.e., if the $text is an element of $_SESSION['entity_crud_hook_test'].
Parameters
$text: Plain text to look for.
$message: Message to display.
$group: The group this message belongs to, defaults to 'Other'.
Return value
TRUE on pass, FALSE on fail.
6 calls to EntityCrudHookTestCase::assertHookMessage()
- EntityCrudHookTestCase::testCommentHooks in modules/
simpletest/ tests/ entity_crud_hook_test.test - Tests hook invocations for CRUD operations on comments.
- EntityCrudHookTestCase::testFileHooks in modules/
simpletest/ tests/ entity_crud_hook_test.test - Tests hook invocations for CRUD operations on files.
- EntityCrudHookTestCase::testNodeHooks in modules/
simpletest/ tests/ entity_crud_hook_test.test - Tests hook invocations for CRUD operations on nodes.
- EntityCrudHookTestCase::testTaxonomyTermHooks in modules/
simpletest/ tests/ entity_crud_hook_test.test - Tests hook invocations for CRUD operations on taxonomy terms.
- EntityCrudHookTestCase::testTaxonomyVocabularyHooks in modules/
simpletest/ tests/ entity_crud_hook_test.test - Tests hook invocations for CRUD operations on taxonomy vocabularies.
File
-
modules/
simpletest/ tests/ entity_crud_hook_test.test, line 49
Class
- EntityCrudHookTestCase
- Tests invocation of hooks when performing an action.
Code
protected function assertHookMessage($text, $message = NULL, $group = 'Other') {
if (!isset($message)) {
$message = $text;
}
return $this->assertTrue(array_search($text, $_SESSION['entity_crud_hook_test']) !== FALSE, $message, $group);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.