function ContentCrudTestCase::assertNodeSaveValues in Content Construction Kit (CCK) 6
Same name and namespace in other branches
- 6.3 tests/content.crud.test \ContentCrudTestCase::assertNodeSaveValues()
- 6.2 tests/content.crud.test \ContentCrudTestCase::assertNodeSaveValues()
Checks that after a node is saved using node_save, the values to be saved match up with the output from node_load.
Parameters
$node Either a node object, or the index of an acquired node:
$values Array of values to be merged with the node and passed to node_save:
Return value
The values array
2 calls to ContentCrudTestCase::assertNodeSaveValues()
File
- tests/
content.crud.test, line 157
Class
- ContentCrudTestCase
- Base class for CCK CRUD tests. Defines many helper functions useful for writing CCK CRUD tests.
Code
function assertNodeSaveValues($node, $values) {
if (is_numeric($node) && isset($this->nodes[$node])) {
$node = $this->nodes[$node];
}
$node = $values + (array) $node;
$node = (object) $node;
node_save($node);
$this
->assertNodeValues($node, $values);
return $values;
}