1<?php 2 3namespace dokuwiki\plugin\config\test\Setting; 4 5use dokuwiki\plugin\config\core\Setting\Setting; 6 7/** 8 * @group plugin_config 9 * @group admin_plugins 10 * @group plugins 11 * @group bundled_plugins 12 */ 13class SettingTest extends AbstractSettingTest { 14 15 /** 16 * Dataprovider for test out 17 * 18 * @return array 19 */ 20 public function dataOut() { 21 return [ 22 ['bar', "\$conf['test'] = 'bar';\n"], 23 ["foo'bar", "\$conf['test'] = 'foo\\'bar';\n"], 24 ]; 25 } 26 27 /** 28 * Check the output 29 * 30 * @param mixed $in The value to initialize the setting with 31 * @param string $out The expected output (for conf[test]) 32 * @dataProvider dataOut 33 */ 34 public function testOut($in, $out) { 35 /** @var Setting $setting */ 36 $setting = new $this->class('test'); 37 $setting->initialize('ignore', $in); 38 39 $this->assertEquals($out, $setting->out('conf')); 40 } 41} 42