You are here

public function LongAnswerUnitTest::unitTestCreateQuestionRevision in Quiz 7.4

Same name and namespace in other branches
  1. 6.6 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
  2. 6.3 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
  3. 6.4 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
  4. 6.5 question_types/long_answer/long_answer.test \LongAnswerUnitTest::unitTestCreateQuestionRevision()
  5. 7 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.'));
}