You are here

function CourseOutlineUiTestCase::createCourseObjectUi in Course 8.3

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/CourseOutlineUiTestCase.php \Drupal\Tests\course\Functional\CourseOutlineUiTestCase::createCourseObjectUi()

Create a course object through the interface.

Parameters

stdClass $courseNode:

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

File

tests/src/Functional/CourseOutlineUiTestCase.php, line 18

Class

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

Namespace

Drupal\Tests\course\Functional

Code

function createCourseObjectUi($courseNode) {

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