You are here

protected function FieldCollectionBasicTestCase::assertHookMessage in Field collection 7

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.

See also

EntityCrudHookTestCase::assertHookMessage()

FieldCollectionBasicTestCase::assertNoHookMessage()

FieldCollectionBasicTestCase::clearHookMessages()

1 call to FieldCollectionBasicTestCase::assertHookMessage()
FieldCollectionBasicTestCase::testCRUD in ./field_collection.test
Tests CRUD.

File

./field_collection.test, line 76
Tests for field_collections.

Class

FieldCollectionBasicTestCase
Test basics.

Code

protected function assertHookMessage($text, $message = NULL, $group = 'Other') {
  if (!isset($message)) {
    $message = $text;
  }
  return $this
    ->assertTrue(in_array($text, $_SESSION['entity_crud_hook_test']), $message, $group);
}