function CourseObjectTestCase::testCourseObjectConfigurations in Course 7.2
Same name and namespace in other branches
- 6 tests/CourseObjectTestCase.test \CourseObjectTestCase::testCourseObjectConfigurations()
- 7 tests/CourseObjectTestCase.test \CourseObjectTestCase::testCourseObjectConfigurations()
Test CourseObject configurations.
File
- tests/
CourseObjectTestCase.test, line 44
Class
- CourseObjectTestCase
- Description of CourseObjectTestCase
Code
function testCourseObjectConfigurations() {
$courseNode = $this
->createCourseNode();
$co1 = $this
->createCourseObject($courseNode);
$co1
->setOption('test_option', 'FIND_ME');
$co1
->save();
$id = $co1
->getId();
$co2 = course_get_course_object_by_id($id);
$this
->assertEqual($co2
->getOption('test_option'), 'FIND_ME', 'Check that options save and load successfully.');
}