You are here

function CourseOutlineUiTestCase::createCourseObjectUi in Course 6

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

Create a course object through the interface.

Parameters

stdClass $courseNode:

2 calls to CourseOutlineUiTestCase::createCourseObjectUi()
CourseOutlineUiTestCase::testCourseOutlineCrud in tests/CourseOutlineUiTestCase.test
Test creating a course object through the UI.
CourseOutlineUiTestCase::testCourseOutlineMaxOccurences in tests/CourseOutlineUiTestCase.test
Test maximum course objects per course.

File

tests/CourseOutlineUiTestCase.test, line 25

Class

CourseOutlineUiTestCase
Test class for dealing with adding and removing elements from the course outline.

Code

function createCourseObjectUi($courseNode) {

  // Add a new course content object.
  $edit = array();
  $edit["more[object_type]"] = 'course_test-course_test_object';
  $this
    ->drupalPost(NULL, $edit, t('Add another'));
  $this
    ->assertText(t('Test course object'));
}