function MenuAttributesTestHelper::assertMenuAttributes in Menu Attributes 7
2 calls to MenuAttributesTestHelper::assertMenuAttributes()
- MenuAttributesNodeTestCase::testMenuNodeFormWidget in ./
menu_attributes.test - Test creating, editing, deleting menu links via node form widget.
- MenuAttributesTestCase::testMenuAttributes in ./
menu_attributes.test - Tests menu attributes functionality.
File
- ./
menu_attributes.test, line 104 - Functionality tests for Menu attributes.
Class
- MenuAttributesTestHelper
- Helper test class with some added functions for testing.
Code
function assertMenuAttributes($form_parent, $action = 'new') {
if ($action == 'new') {
foreach ($this->menu_attributes_new as $attribute => $value) {
$this
->assertFieldByName($form_parent . '[' . $attribute . ']', $value, t("'{$attribute}' attribute correct in edit form."));
}
}
else {
foreach ($this->menu_attributes_edit as $attribute => $value) {
$this
->assertFieldByName($form_parent . '[' . $attribute . ']', $value, t("New '{$attribute}' attribute correct in edit form."));
}
}
}