protected function LingotekProfileFormTest::assertFieldDisabled in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 4.0.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.0.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.1.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.2.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.3.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.4.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.6.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.7.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
- 3.8.x tests/src/Functional/Form/LingotekProfileFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekProfileFormTest::assertFieldDisabled()
Asserts that a field in the current page is disabled.
Parameters
string $id: Id of field to assert.
string $message: Message to display.
Return value
bool TRUE on pass, FALSE on fail.
1 call to LingotekProfileFormTest::assertFieldDisabled()
- LingotekProfileFormTest::testDefaultProfilesPresent in tests/
src/ Functional/ Form/ LingotekProfileFormTest.php - Test that default profiles are present.
File
- tests/
src/ Functional/ Form/ LingotekProfileFormTest.php, line 757
Class
- LingotekProfileFormTest
- Tests the Lingotek profile form.
Namespace
Drupal\Tests\lingotek\Functional\FormCode
protected function assertFieldDisabled($id, $message = '') {
$elements = $this
->xpath('//input[@id=:id]', [
':id' => $id,
]);
return $this
->assertTrue(isset($elements[0]) && !empty($elements[0]
->getAttribute('disabled')), $message ? $message : t('Field @id is disabled.', [
'@id' => $id,
]), t('Browser'));
}