You are here

protected function SkinrWebTestCase::assertHookMessage in Skinr 7.2

Pass if the message $text was set by one of the CRUD hooks in skinr_test.module, i.e., if the $text is an element of $_SESSION['skinr_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.

2 calls to SkinrWebTestCase::assertHookMessage()
SkinrApiTestCase::testSkinrSkinHooks in tests/skinr.test
Test hook invocations for CRUD operations on skin configurations.
SkinrContextApiTestCase::testSkinrContextGroupHooks in skinr_context/tests/skinr_context.test
Test hook invocations for CRUD operations on skin settings groups.

File

tests/skinr.test, line 61
Tests for the Skinr module.

Class

SkinrWebTestCase
@file Tests for the Skinr module.

Code

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