public function LongAnswerUnitTest::unitTestCreateQuestionRevision in Quiz 7
Same name and namespace in other branches
- 6.6 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
- 6.3 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
- 6.4 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
- 6.5 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
- 7.4 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
Test creation of node revision.
1 call to LongAnswerUnitTest::unitTestCreateQuestionRevision()
- 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 201 - Unit tests for the long_answer Module.
Class
- LongAnswerUnitTest
- Unit tests for the long_answer Module. @file
Code
public function unitTestCreateQuestionRevision() {
$node = node_load($this->nid1);
$oldVid = $node->vid;
$node->revision = 1;
node_save($node);
$oldMax = $node->maximum_score;
$nodeCopy = node_load($node->nid, $node->vid);
$this
->assertNotEqual($nodeCopy->vid, $oldVid, t('Check that VID of new version is not the same as old VID.'));
$this
->assertEqual($oldMax, $nodeCopy->maximum_score, t('Check that new VID has an entry in node properties.'));
}