DevelModulesReinstallTest.php in Devel 8.3
File
tests/src/Functional/DevelModulesReinstallTest.php
View source
<?php
namespace Drupal\Tests\devel\Functional;
class DevelModulesReinstallTest extends DevelBrowserTestBase {
protected $profile = 'minimal';
protected function setUp() {
parent::setUp();
$this
->drupalLogin($this->adminUser);
}
public function testDevelReinstallModules() {
$modules = [
'dblog',
'block',
];
sort($modules);
$this
->drupalGet('devel/reinstall');
$edit = [];
foreach ($modules as $module) {
$edit["reinstall[{$module}]"] = TRUE;
}
$this
->drupalPostForm('devel/reinstall', $edit, 'Reinstall');
$this
->assertSession()
->pageTextContains('Uninstalled and installed: ' . implode(', ', $modules) . '.');
}
}