$this->
drupalGet('admin/reports/status'
);
$session->
pageTextNotContains('Deprecated modules enabled'
);
$session->
pageTextNotContains('Deprecated modules found: Deprecated module.'
);
$this->
assertSession()->
elementNotExists('xpath', "//a[contains(@href, 'http://example.com/deprecated')]"
);
// Make sure there are no warnings about obsolete modules.
$session->
pageTextNotContains('Obsolete extensions enabled'
);
$session->
pageTextNotContains('Obsolete extensions found: System obsolete status test.'
);
// Install an obsolete module. Normally this isn't possible, so write to
// configuration directly.
$this->
config('core.extension'
)->
set('module.system_status_obsolete_test', 0
)->
save();
$this->
rebuildAll();
$this->
drupalGet('admin/reports/status'
);
$session->
pageTextContains('Obsolete extensions enabled'
);
$session->
pageTextContains('Obsolete extensions found: System obsolete status test.'
);
$session->
pageTextContains('Obsolete extensions are provided only so that they can be uninstalled cleanly. You should immediately uninstall these extensions since they may be removed in a future release.'
);
$this->
assertSession()->
elementExists('xpath', "//a[contains(@href, '/admin/modules/uninstall')]"
);
// Make sure the warning is gone after uninstalling the module.
$module_installer->
uninstall(['system_status_obsolete_test'
]);
$this->
drupalGet('admin/reports/status'
);
$session->
pageTextNotContains('Obsolete extensions enabled'
);