public function MultigraphWebTest::doTestMultigraphDelete in Monitoring 8
Tests multigraph deletion.
1 call to MultigraphWebTest::doTestMultigraphDelete()
- MultigraphWebTest::testMultigraphForm in modules/
multigraph/ tests/ src/ Functional/ MultigraphWebTest.php - Configures test base and executes test cases.
File
- modules/
multigraph/ tests/ src/ Functional/ MultigraphWebTest.php, line 144 - Contains \Drupal\monitoring_multigraph\Tests\MultigraphWebTest
Class
- MultigraphWebTest
- Tests the Multigraph forms (add/edit/delete).
Namespace
Drupal\Tests\monitoring_multigraph\FunctionalCode
public function doTestMultigraphDelete() {
// Go to multigraph overview and check for pre-installed multigraph.
$this
->drupalGet('admin/config/system/monitoring/multigraphs');
// Check label and description (before deleting).
$this
->assertText('Watchdog severe entries');
$this
->assertText('Watchdog entries with severity Warning or higher');
// Delete.
$this
->drupalPostForm('admin/config/system/monitoring/multigraphs/watchdog_severe_entries/delete', [], t('Delete'));
$this
->assertText('The Watchdog severe entries (test) multigraph has been deleted');
// Go back to multigraph overview and check that multigraph is deleted.
$this
->drupalGet('admin/config/system/monitoring/multigraphs');
$this
->assertNoText('Watchdog severe entries');
$this
->assertNoText('Watchdog entries with severity Warning or higher');
}