You are here

function CourseNodeTest::testCourseNode in Course 3.x

File

modules/course_node/tests/src/Functional/CourseNodeTest.php, line 16

Class

CourseNodeTest
Test course node functionality.

Namespace

Drupal\Tests\course_node\Functional

Code

function testCourseNode() {
  $this
    ->drupalLogin($this->admin_user);
  $this
    ->drupalGet("node/add/course");
  $this
    ->submitForm([
    'title[0][value]' => 'Course page title 1',
    'course[form][0][title][0][value]' => 'Course title 1',
  ], t('Save'));
  $this
    ->drupalLogin($this->student_user);
  $this
    ->drupalGet('node/1');
  $this
    ->clickLink('Course title 1');
  $this
    ->clickLink('Take course');
  $this
    ->clickLink('Complete');
}