You are here

protected function ForumAccessBaseTestCase::assertNoButton in Forum Access 7

Pass if a button with the specified label is not found.

Parameters

$label: Text in the value attribute.

$message: Message to display.

$group: The group this message belongs to, defaults to 'Other'.

Return value

TRUE if the assertion succeeded, FALSE otherwise.

1 call to ForumAccessBaseTestCase::assertNoButton()
ForumAccessBaseTestCase::checkForum in tests/forum_access_test_base.php
Check the set of permissions in one forum.

File

tests/forum_access_test_base.php, line 283
Base class with auxiliary functions for forum access module tests.

Class

ForumAccessBaseTestCase
Base test class for the Forum Access module.

Code

protected function assertNoButton($label, $message = '', $group = 'Other') {
  $links = $this
    ->xpath('//input[contains(@type, submit)][contains(@value, :label)]', array(
    ':label' => $label,
  ));
  $message = $message ? $message : t('Button with label %label found.', array(
    '%label' => $label,
  ));
  return $this
    ->assert(empty($links), $message, $group);
}