'prosilver', 'copyright' => '© phpBB Group, 2007', 'version' => '3.0.12', ), ), array( 'name = subsilver2 copyright = © 2005 phpBB Group version = 3.0.12', array( 'name' => 'subsilver2', 'copyright' => '© 2005 phpBB Group', 'version' => '3.0.12', ), ), array( 'foo = on foo1 = true foo2 = 1 bar = off bar1 = false bar2 = 0 foobar = foobar1 = "asdf" foobar2 = \'qwer\'', array( 'foo' => true, 'foo1' => true, 'foo2' => true, 'bar' => false, 'bar1' => false, 'bar2' => false, 'foobar' => '', 'foobar1' => 'asdf', 'foobar2' => 'qwer', ), ), array( 'foo = & bar bar = Test', array( 'foo' => '&amp; bar', 'bar' => '<a href="test">Test</a>', ), ), ); } /** * @dataProvider parse_cfg_file_data */ public function test_parse_cfg_file($file_contents, $expected) { $lines = explode("\n", $file_contents); $this->assertEquals($expected, parse_cfg_file(false, $lines)); } }