public function ConfigurationUITest::testTrackingUI in Configuration Management 7.2
Same name and namespace in other branches
- 7 tests/configuration.test \ConfigurationUITest::testTrackingUI()
File
- ui/
tests/ configuration_ui.test, line 123 - Tests for Configuration Management
Class
Code
public function testTrackingUI() {
$this
->drupalGet('admin/config/system/configuration/tracking');
$this
->assertRaw('No Configurations were found');
$edit = array();
$edit['items[content_type.article]'] = TRUE;
$this
->drupalPost('admin/config/system/configuration/notracking', $edit, t('Start Tracking'));
foreach ($this->configurations as $id) {
$this
->assertRaw('Tracking ' . $id);
}
$this
->drupalGet('admin/config/system/configuration/notracking');
foreach ($this->configurations as $id) {
list($component, $identifier) = explode('.', $id, 2);
$this
->assertNoFieldByName('items[' . $id . ']', $id, t("Checkbox for @identifier not found", array(
'@identifier' => $id,
)));
}
$this
->drupalGet('admin/config/system/configuration/tracking');
foreach ($this->components as $component => $name) {
$this
->assertRaw('<span class="fieldset-legend">' . $name . '</span>');
}
foreach ($this->configurations as $id) {
list($component, $identifier) = explode('.', $id, 2);
$this
->assertFieldByName('items[' . $id . ']', $id, t("Checkbox for @identifier found", array(
'@identifier' => $id,
)));
}
$edit = array();
$edit['items[content_type.article]'] = TRUE;
$this
->drupalPost('admin/config/system/configuration/tracking', $edit, t('Stop Tracking'));
foreach ($this->configurations as $id) {
$this
->assertRaw('Untracked ' . $id);
}
$this
->assertRaw('No Configurations were found');
$this
->drupalGet('admin/config/system/configuration/notracking');
foreach ($this->configurations as $id) {
list($component, $identifier) = explode('.', $id, 2);
$this
->assertFieldByName('items[' . $id . ']', $id, t("Checkbox for @identifier found", array(
'@identifier' => $id,
)));
}
}