protected function LingotekProfileFormTest::assertFieldEnabled in Lingotek Translation 8
Asserts that a field in the current page is enabled.
Parameters
$id: Id of field to assert.
$message: Message to display.
Return value
bool TRUE on pass, FALSE on fail.
1 call to LingotekProfileFormTest::assertFieldEnabled()
- LingotekProfileFormTest::testAddingProfile in src/
Tests/ Form/ LingotekProfileFormTest.php - Test adding a profile are present.
File
- src/
Tests/ Form/ LingotekProfileFormTest.php, line 423
Class
- LingotekProfileFormTest
- Tests the Lingotek profile form.
Namespace
Drupal\lingotek\Tests\FormCode
protected function assertFieldEnabled($id, $message = '') {
$elements = $this
->xpath('//input[@id=:id]', array(
':id' => $id,
));
return $this
->assertTrue(isset($elements[0]) && empty($elements[0]['disabled']), $message ? $message : t('Field @id is enabled.', array(
'@id' => $id,
)), t('Browser'));
}