function CourseObjectNodeTestCase::testObjectInstanceDeletion in Course 7.2
Test that an object's instance can be deleted.
File
- tests/
CourseObjectNodeTestCase.test, line 72
Class
- CourseObjectNodeTestCase
- Description of CourseObjectNodeTestCase
Code
function testObjectInstanceDeletion() {
$courseNode = $this
->createCourseNode();
$this
->drupalGet("node/{$courseNode->nid}/course-outline");
$this
->createCourseObjectUi($courseNode, t('Course test content'));
$this
->drupalPost(NULL, array(), t('Save outline'));
$this
->clickLink(t('Settings'));
$this
->drupalPost(NULL, array(
'delete_instance' => 1,
), t('Delete'));
$this
->assertText('Object will be removed from outline, and related instance(s) will be deleted');
$this
->drupalPost(NULL, array(), t('Save outline'));
}