public function TrueFalseUnitTest::unitTestCreateTrueFalseQuestionNode in Quiz 7.4
Same name and namespace in other branches
- 6.6 question_types/truefalse/truefalse.test \TrueFalseUnitTest::unitTestCreateTrueFalseQuestionNode()
- 6.4 question_types/truefalse/truefalse.test \TrueFalseUnitTest::unitTestCreateTrueFalseQuestionNode()
- 7 question_types/truefalse/truefalse.test \TrueFalseUnitTest::unitTestCreateTrueFalseQuestionNode()
Create and then update a node.
1 call to TrueFalseUnitTest::unitTestCreateTrueFalseQuestionNode()
- TrueFalseUnitTest::testTrueFalseNodeOperations in question_types/
truefalse/ truefalse.test - Run a bundle of Node API tests.
File
- question_types/
truefalse/ truefalse.test, line 109
Class
Code
public function unitTestCreateTrueFalseQuestionNode() {
$node = $this
->createTrueFalseQuestion();
// raise an exception if the quiz node is not created
if (!$node) {
throw new Exception('Expected to have a node to work with.');
}
$this->node_id = $node->nid;
$this
->assertEqual($node->title, $this->title, t('Title of stored node should equal the original title.'));
$this
->assertEqual($node->body, $this->body, t('Body of stored node should be equal to original body.'));
$this
->assertEqual($node->type, $this->question_node_type, t('Stored node type should be true_false'));
}