You are here

function CourseObjectTestCase::testCourseObjectConfigurations in Course 6

Same name and namespace in other branches
  1. 7.2 tests/CourseObjectTestCase.test \CourseObjectTestCase::testCourseObjectConfigurations()
  2. 7 tests/CourseObjectTestCase.test \CourseObjectTestCase::testCourseObjectConfigurations()

Test CourseObject configurations.

File

tests/CourseObjectTestCase.test, line 46

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.');
}