function ParseInfoFilesTestCase::testParseInfoFile
7.x common.test | ParseInfoFilesTestCase::testParseInfoFile() |
Parse an example .info file an verify the results.
File
- drupal-7.x/
modules/ simpletest/ tests/ common.test, line 2272 - Tests for common.inc functionality.
Class
- ParseInfoFilesTestCase
- Test the drupal_parse_info_file() API function.
Code
function testParseInfoFile() {
$info_values = drupal_parse_info_file(drupal_get_path('module', 'simpletest') . '/tests/common_test_info.txt');
$this->assertEqual($info_values['simple_string'], 'A simple string', 'Simple string value was parsed correctly.', 'System');
$this->assertEqual($info_values['simple_constant'], WATCHDOG_INFO, 'Constant value was parsed correctly.', 'System');
$this->assertEqual($info_values['double_colon'], 'dummyClassName::', 'Value containing double-colon was parsed correctly.', 'System');
}