protected function ModuleUnitTest::assertModuleList in Drupal 7
Assert that module_list() return the expected values.
Parameters
$expected_values: The expected values, sorted by weight and module name.
1 call to ModuleUnitTest::assertModuleList()
- ModuleUnitTest::testModuleList in modules/
simpletest/ tests/ module.test - The basic functionality of module_list().
File
- modules/
simpletest/ tests/ module.test, line 77 - Tests for the module API.
Class
- ModuleUnitTest
- Unit tests for the module API.
Code
protected function assertModuleList(array $expected_values, $condition) {
$expected_values = array_combine($expected_values, $expected_values);
$this
->assertEqual($expected_values, module_list(), format_string('@condition: module_list() returns correct results', array(
'@condition' => $condition,
)));
ksort($expected_values);
$this
->assertIdentical($expected_values, module_list(FALSE, FALSE, TRUE), format_string('@condition: module_list() returns correctly sorted results', array(
'@condition' => $condition,
)));
}