You are here

protected function SkinrWebTestBase::assertHookMessage in Skinr 8.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

bool TRUE on pass, FALSE on fail.

1 call to SkinrWebTestBase::assertHookMessage()
SkinrApiTest::testSkinrSkinHooks in src/Tests/SkinrApiTest.php
Test hook invocations for CRUD operations on skin configurations.

File

src/Tests/SkinrWebTestBase.php, line 65
Contains \Drupal\skinr\Tests\SkinrWebTestBase.

Class

SkinrWebTestBase

Namespace

Drupal\skinr\Tests

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);
}