protected function NameTestHelper::assertFieldCheckedByName in Name Field 7
File
- tests/
name.test, line 41 - Tests for the name module.
Class
- NameTestHelper
- Helper test class with some added functions for testing.
Code
protected function assertFieldCheckedByName($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 checked.', array(
'@name' => $name,
)), t('Browser'));
}