protected function ModuleUnitTest::assertModuleList in SimpleTest 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 tests/
module.test - The basic functionality of module_list().
File
- 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
->assertIdentical($expected_values, module_list(), t('@condition: module_list() returns correct results', array(
'@condition' => $condition,
)));
ksort($expected_values);
$this
->assertIdentical($expected_values, module_list(FALSE, FALSE, TRUE), t('@condition: module_list() returns correctly sorted results', array(
'@condition' => $condition,
)));
}