You are here

function CourseOutlineUiTest::testObjectDeletion in Course 3.x

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

File

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

Class

CourseOutlineUiTest
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');
}