public function PackageManagementTest::testEnable in MongoDB 7
Test successful execution of hook_requirements() during install/enable.
Function module_enable() does not check requirements, unlike normal enabling, so we need to invoke the hook manually to simulate it.
File
- src/
Tests/ PackageManagementTest.php, line 50
Class
- PackageManagementTest
- Test package management hooks.
Namespace
Drupal\mongodb\TestsCode
public function testEnable() {
module_load_install(static::MODULE);
module_invoke(static::MODULE, 'requirements', 'install');
module_enable([
static::MODULE,
], FALSE);
$this
->pass('Successfully enabled mongodb.module.');
}