public function TrueFalseUnitTest::unitTestCreateTrueFalseQuestionRevision in Quiz 6.6
Same name and namespace in other branches
- 6.4 question_types/truefalse/truefalse.test \TrueFalseUnitTest::unitTestCreateTrueFalseQuestionRevision()
- 7 question_types/truefalse/truefalse.test \TrueFalseUnitTest::unitTestCreateTrueFalseQuestionRevision()
- 7.4 question_types/truefalse/truefalse.test \TrueFalseUnitTest::unitTestCreateTrueFalseQuestionRevision()
Test creation of node revision.
1 call to TrueFalseUnitTest::unitTestCreateTrueFalseQuestionRevision()
- TrueFalseUnitTest::testTrueFalseNodeOperations in question_types/
truefalse/ truefalse.test - Run a bundle of Node API tests.
File
- question_types/
truefalse/ truefalse.test, line 171
Class
Code
public function unitTestCreateTrueFalseQuestionRevision() {
$node = node_load($this->node_id);
$oldVid = $node->vid;
$node->revision = 1;
node_save($node);
$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.'));
}