You are here

function CourseOutlineUiTestCase::testObjectDeletion in Course 8.2

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

Test that an object can be marked for deletion from the course outline without validation.

File

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

Class

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

Namespace

Drupal\Tests\course\Functional

Code

function testObjectDeletion() {
  $this
    ->testCourseOutlineCrud();
  $this
    ->drupalPostForm(NULL, [], t('edit-delete-button'));
  $this
    ->assertText('Object will be removed from outline');
  $this
    ->drupalGet("course/1/outline");
  $this
    ->drupalPostForm(NULL, [], t('Save outline'));
  $this
    ->assertNoText('Object will be removed from outline');
}