function ABTEnviromentTestCase::envTestNodeData in Access By Term 7
1 call to ABTEnviromentTestCase::envTestNodeData()
File
- ./
abt.test, line 239
Class
Code
function envTestNodeData() {
$node = $this
->drupalCreateNode(array(
'type' => $this->content_type->type,
));
$n = node_load($node->nid);
$this
->assertTrue(isset($n->nid), 'Node created. (Nid:' . $n->nid . ')');
$n->{$this->field_instances['node'][0]['field_name']}[$node->language][]['tid'] = $this->terms[0][1]->tid;
node_save($n);
$saved_tid = $n->{$this->field_instances['node'][0]['field_name']}[$node->language][0]['tid'];
$n = node_load($n->nid);
// just in case :)
$this
->assertTrue(isset($n->nid) && $this->terms[0][1]->tid == $saved_tid, 'Term reference added. (Nid:' . $n->nid . ' - Tid:' . $saved_tid . ')');
}