1 common.test CommonBackdropParseInfoFileTestCase::testParseInfoFile()

Parse an example .info file an verify the results.

File

core/modules/simpletest/tests/common.test, line 2629
Tests for common.inc functionality.

Class

CommonBackdropParseInfoFileTestCase
Tests the backdrop_parse_info_file() API function.

Code

function testParseInfoFile() {
  $info_values = backdrop_parse_info_file(backdrop_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');
}