public function ConfigurationUITest::testTrackingUI in Configuration Management 7
Same name and namespace in other branches
- 7.2 ui/tests/configuration_ui.test \ConfigurationUITest::testTrackingUI()
Tests the tracking UI.
File
- tests/
configuration.test, line 470 - Tests for Configuration Management
Class
Code
public function testTrackingUI() {
$this
->trackConfigurations();
$roles = user_roles();
$this
->drupalGet('admin/config/system/configuration/tracking');
// If non there are not overriden configurations, the link 'Activestore
// Changed' shouldn't exists in this UI.
$this
->assertNoLink('Activestore Changed', 'Activestore Changed link not found');
// For each tracked component (except for those that are dependencies of
// others), there should be a link to stop tracking the component.
$config = configuration_get_configuration();
foreach ($this->trackedComponents as $component => $identifiers) {
foreach ($identifiers as $identifier) {
if (empty($config[$component][$identifier]['parent'])) {
$this
->assertFieldByName($component . '[items][' . $identifier . ']', $identifier, t("Checkbox for @identifier found", array(
'@identifier' => $identifier,
)));
$this
->assertRaw('admin/config/system/configuration/config/' . $component . '/' . str_replace(' ', '%20', $identifier) . '/delete', t('Stop tracking link for @component (@identifier) found', array(
'@component' => $component,
'@identifier' => $identifier,
)));
}
}
}
}