Closed (fixed)
Project:
SimpleTest automator
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Sep 2007 at 20:13 UTC
Updated:
1 Oct 2007 at 01:21 UTC
trying to make a test for menu module - for a form with #tree = TRUE.
Add a new menu link to the navigation menu at the path admin/build/menu-customize/navigation/add
When I started to build a testing using this module it suggests the following for the POST:
$edit = array (
'menu' =>
array (
'link_path' => '<front>',
'link_title' => $title
'description' => '',
'parent' => 'navigation:0',
'weight' => '0',
),
'op' => 'Save',
'form_id' => 'menu_edit_item',
);
$this->drupalPostRequest("admin/build/menu-customize/navigation/add", $edit, "Save");
But that totally fails. I got this working now using instead:
$edit = array (
'menu[link_path]' => '<front>',
'menu[link_title]' => $title,
'menu[description]' => '',
'menu[parent]' => 'navigation:0',
'menu[weight]' => '0',
);
$this->drupalPostRequest(url("admin/build/menu-customize/navigation/add", array('absolute' => TRUE)), $edit, "Save");
Comments
Comment #1
chx commentedsomething is funny here, dump $_POST and see.
Comment #2
chx commentedAh yes. I see and fixed it.
Comment #3
pwolanin commentedsee:
http://drupal.org/node/173461#comment-306093
Comment #4
(not verified) commented