You are here

public function ShortAnswerUnitTest::unitTestCheckShortAnswerNodeProperties in Quiz 7.4

Same name and namespace in other branches
  1. 6.6 question_types/short_answer/short_answer.test \ShortAnswerUnitTest::unitTestCheckShortAnswerNodeProperties()
  2. 6.4 question_types/short_answer/short_answer.test \ShortAnswerUnitTest::unitTestCheckShortAnswerNodeProperties()
  3. 7 question_types/short_answer/short_answer.test \ShortAnswerUnitTest::unitTestCheckShortAnswerNodeProperties()
1 call to ShortAnswerUnitTest::unitTestCheckShortAnswerNodeProperties()
ShortAnswerUnitTest::testShortAnswerNodeOperations in question_types/short_answer/short_answer.test
Run a bundle of Node API tests.

File

question_types/short_answer/short_answer.test, line 158

Class

ShortAnswerUnitTest

Code

public function unitTestCheckShortAnswerNodeProperties() {
  $sql = "SELECT maximum_score, correct_answer, correct_answer_evaluation FROM {quiz_short_answer_node_properties} WHERE nid = %d";
  $node = db_fetch_object(db_query($sql, $this->node_id));
  $this
    ->assertEqual($node->maximum_score, $this->maximum_score, t('Test that maximum  score was appropriately stored in database.'));
  $this
    ->assertEqual($node->correct_answer, $this->correct_answer, t('Test that correct answer was appropriately stored in database'));
  $this
    ->assertEqual($node->correct_answer_evaluation, $this->correct_answer_evaluation, t('Test that correct answer evaluation was appropriately stored in database'));
}