Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm having trouble Hierarchial Select in simpletest. I'm trying to test node creation with a required term reference field using the hs widget with dropbox. But it looks like the field value is not submitted in a way that simpletest can handle.
This is the part where I've defined the value of the field in the $edit array and then use drupalPost to submit the article.
$edit["field_site[und][hierarchical_select][selects][0]"] = $tid;
$this->drupalPost('node/add/article', $edit, t('Save'));
But it fails with the required field "field_site" not set. This test worked before I changed the field to heirarchial select, but now I can't figure out how to get it to pass.
Comments