You are here

protected function NameTestHelper::assertNoFieldCheckedByName in Name Field 7

File

tests/name.test, line 33
Tests for the name module.

Class

NameTestHelper
Helper test class with some added functions for testing.

Code

protected function assertNoFieldCheckedByName($name, $message = '') {
  $elements = $this
    ->xpath('//input[@name=:name]', array(
    ':name' => $name,
  ));
  return $this
    ->assertTrue(isset($elements[0]) && empty($elements[0]['checked']), $message ? $message : t('Checkbox field @name is not checked.', array(
    '@name' => $name,
  )), t('Browser'));
}