1 form.test public FormElementTestCase::testDisabledTabledragRow()

Test disabled tableselect row.

File

core/modules/simpletest/tests/form.test, line 723
Unit tests for the Backdrop Form API.

Class

FormElementTestCase
Tests building and processing of core form elements.

Code

public function testDisabledTabledragRow() {
  $this->backdropGet('form-test/disabled-tabledrag-row');
  $element = $this->xpath('//input[@name="tabledrag_test[5]"][@disabled]');
  $this->assertEqual(count($element), 1, 'One disabled tabledrag checkbox has been found');
  $element = $this->xpath('//form[@class="form-test-disabled-tabledrag-row"]//tr[contains(@class, "disabled")]');
  $this->assertEqual(count($element), 1, 'One tabledrag row with class "disabled" has been found');
}