You are here

function CourseObjectTestCase::testCourseObjectConstruction in Course 6

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

Test the construction of CourseObjects.

File

tests/CourseObjectTestCase.test, line 61

Class

CourseObjectTestCase
Description of CourseObjectTestCase

Code

function testCourseObjectConstruction() {
  $courseNode = $this
    ->createCourseNode();
  $this
    ->createCourseObject($courseNode);
  $course = course_get_course($courseNode);
  $courseObject = reset($course
    ->getObjects());
  $getCourse = $courseObject
    ->getCourse();
  $this
    ->assertEqual(spl_object_hash($course), spl_object_hash($getCourse), 'Check that Courses inside of CourseObjects inside of Course are the same.');
}