public function MatchingUnitTest::unitTestCreateMatchingQuestionNode in Quiz 7
Same name and namespace in other branches
- 6.6 question_types/matching/matching.test \MatchingUnitTest::unitTestCreateMatchingQuestionNode()
- 6.4 question_types/matching/matching.test \MatchingUnitTest::unitTestCreateMatchingQuestionNode()
- 7.4 question_types/matching/matching.test \MatchingUnitTest::unitTestCreateMatchingQuestionNode()
1 call to MatchingUnitTest::unitTestCreateMatchingQuestionNode()
- MatchingUnitTest::testMatchingNodeOperations in question_types/
matching/ matching.test - Run a bundle of Node API tests.
File
- question_types/
matching/ matching.test, line 121 - Unit tests for the matching Module.
Class
- MatchingUnitTest
- @file Unit tests for the matching Module.
Code
public function unitTestCreateMatchingQuestionNode() {
$node = $this
->createMatchingQuestion();
// raise an exception if node is not created.
if (!$node) {
throw new Exception('Expected to have a node to work with.');
}
$this->node_id = $node->nid;
$this
->assertEqual($node->title, $this->title, t('Title of stored node should equal the original title.'));
$this
->assertEqual($node->body, $this->body, t('Body of stored node should be equal to original body.'));
$this
->assertEqual($node->type, $this->question_node_type, t('Stored node type should be matching'));
}