You are here

function CourseTestCase::createCourseNode in Course 7

Same name and namespace in other branches
  1. 6 tests/CourseTestCase.test \CourseTestCase::createCourseNode()
  2. 7.2 tests/CourseTestCase.test \CourseTestCase::createCourseNode()

Create a course node using the test content type.

Return value

stdClass

40 calls to CourseTestCase::createCourseNode()
CourseAccessTestCase::testDurationExpiration in tests/CourseAccessTestCase.test
Test the enrollment duration. This does not test the enrollment end date being set correctly.
CourseAccessTestCase::testReleaseExpiration in tests/CourseAccessTestCase.test
Test the open/close date functionality.
CourseContextTestCase::testDetermineContext in tests/CourseContextTestCase.test
Testing finding course and objects via parameter search.
CourseContextTestCase::testMultiContext in tests/CourseContextTestCase.test
Test objects that belong to multiple courses.
CourseEnrollmentTestCase::testCourseBundles in tests/CourseEnrollmentTestCase.test
Test course bundles.

... See full list

File

tests/CourseTestCase.test, line 21

Class

CourseTestCase
Master class for Course tests.

Code

function createCourseNode(array $extra = array()) {
  $defaults = array(
    'type' => 'course_test',
    'course' => array(
      'outline' => 'course',
    ),
  );
  $node = $this
    ->drupalCreateNode(array_merge_recursive($defaults, $extra));
  return $node;
}