boot.test in Drupal 7
File
modules/simpletest/tests/boot.test
View source
<?php
class EarlyBootstrapTestCase extends DrupalWebTestCase {
public static function getInfo() {
return array(
'name' => 'Early bootstrap test',
'description' => 'Confirm that calling module_implements() during early bootstrap does not pollute the module_implements() cache.',
'group' => 'System',
);
}
function setUp() {
parent::setUp('boot_test_1', 'boot_test_2');
}
public function testHookBoot() {
$paths = array(
'',
'early_exit',
);
foreach ($paths as $path) {
module_implements(NULL, FALSE, TRUE);
$this
->drupalGet($path);
drupal_static_reset();
$modules = module_implements('help');
$this
->assertTrue(in_array('boot_test_2', $modules));
}
}
}