Hi,
While creating node via simpletest, how to assign value to content taxonomy and CCK fields?
I tried with the below approaches but its throwing errors
$_tArray = taxonomy_get_term_by_name('e-Commerce');
$parent[$_tArray[0]->tid] = $_tArray[0]->tid;
$node_array = array(
'title' => 'Test title',
'body' => 'Test Body',
'taxonomy' => $parent,
'field_topic[0][value]' => $parent,
);
// Save node
$this->drupalPost('node/add/article', $node_array, t('Save'));
Error :
strlen() expects parameter 1 to be string, array given
htmlspecialchars() expects parameter 1 to be string, array given
It would be great if I can get some inputs on the same
Thanks in advance
Sundar
Comments
Comment #1
lendudeThis version is not supported anymore.