Chris@0: drupalGet('admin/modules'); Chris@0: foreach ($module_info as $module => $info) { Chris@0: // Check to make sure the checkbox for each required module is disabled Chris@0: // and checked (or absent from the page if the module is also hidden). Chris@0: if (!empty($info['required'])) { Chris@0: $field_name = 'modules[' . $module . '][enable]'; Chris@0: if (empty($info['hidden'])) { Chris@0: $this->assertFieldByXPath("//input[@name='$field_name' and @disabled='disabled' and @checked='checked']", '', format_string('Field @name was disabled and checked.', ['@name' => $field_name])); Chris@0: } Chris@0: else { Chris@0: $this->assertNoFieldByName($field_name); Chris@0: } Chris@0: } Chris@0: } Chris@0: } Chris@0: Chris@0: }