1 module.test | protected ModuleUnitTest::assertModuleList(Array $expected_values, $condition) |
Assert that module_list() return the expected values.
Parameters
$expected_values: The expected values, sorted by weight and module name.
File
- core/
modules/ simpletest/ tests/ module.test, line 74 - 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)));
}