public function LongAnswerUnitTest::unitTestUpdateQuestionNode in Quiz 7
Same name and namespace in other branches
- 6.6 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestUpdateQuestionNode()
- 6.3 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestUpdateQuestionNode()
- 6.4 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestUpdateQuestionNode()
- 6.5 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestUpdateQuestionNode()
- 7.4 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestUpdateQuestionNode()
Test updating of a question.
1 call to LongAnswerUnitTest::unitTestUpdateQuestionNode()
- LongAnswerUnitTest::testNodeAPI in question_types/
long_answer/ long_answer.test - Run a bundle of Node API tests.
File
- question_types/
long_answer/ long_answer.test, line 187 - Unit tests for the long_answer Module.
Class
- LongAnswerUnitTest
- Unit tests for the long_answer Module. @file
Code
public function unitTestUpdateQuestionNode() {
$newScore = 2;
$node = node_load($this->nid1);
$node->maximum_score = $newScore;
node_save($node);
$nodeCopy = node_load($node->nid, $node->vid);
$this
->assertEqual($nodeCopy->maximum_score, $newScore, t('Check that stored score is the same as newly assigned score.'));
}