public function RulesConditionalUITestCase::testEmptyUI in Conditional Rules 7
Same name and namespace in other branches
- 8 tests/rules_conditional.test \RulesConditionalUITestCase::testEmptyUI()
Tests RulesConditionalEmptyUI.
File
- tests/
rules_conditional.test, line 717 - SimpleTest testing suites.
Class
- RulesConditionalUITestCase
- UI tests.
Code
public function testEmptyUI() {
// Create component.
$componentName = 'empty_test';
$comp = rules_action_set(array());
$comp->component = TRUE;
$comp
->integrityCheck()
->save($componentName);
$componentPath = 'admin/config/workflow/rules/components';
RulesPluginUI::$basePath = $componentPath;
$managePath = RulesPluginUI::path($componentName);
$addPath = RulesPluginUI::path($componentName, 'add', $comp, 'stub conditional');
// Test adding with empty UI.
$this
->drupalGet($addPath);
$this
->assertUrl($managePath, array(), 'Adding via the empty UI redirects to the parent edit form.');
}