Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
some more tests on the output mechanism
- Loading branch information
1 parent
98a151b
commit c73b800
Showing
4 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace dokuwiki\plugin\config\test\Setting; | ||
|
||
/** | ||
* @group plugin_config | ||
* @group admin_plugins | ||
* @group plugins | ||
* @group bundled_plugins | ||
*/ | ||
class SettingArrayTest extends SettingTest { | ||
|
||
/** @inheritdoc */ | ||
public function dataOut() { | ||
return [ | ||
[ ['foo','bar'], "\$conf['test'] = array('foo', 'bar');\n"] | ||
]; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace dokuwiki\plugin\config\test\Setting; | ||
|
||
/** | ||
* @group plugin_config | ||
* @group admin_plugins | ||
* @group plugins | ||
* @group bundled_plugins | ||
*/ | ||
class SettingNumericTest extends SettingTest { | ||
|
||
/** @inheritdoc */ | ||
public function dataOut() { | ||
return [ | ||
[42, "\$conf['test'] = 42;\n"], | ||
[0, "\$conf['test'] = 0;\n"], | ||
[-42, "\$conf['test'] = -42;\n"], | ||
[-42.13, "\$conf['test'] = -42.13;\n"], | ||
['12*13', "\$conf['test'] = 12*13;\n"], | ||
]; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace dokuwiki\plugin\config\test\Setting; | ||
|
||
/** | ||
* @group plugin_config | ||
* @group admin_plugins | ||
* @group plugins | ||
* @group bundled_plugins | ||
*/ | ||
class SettingOnoffTest extends SettingTest { | ||
|
||
/** @inheritdoc */ | ||
public function dataOut() { | ||
return [ | ||
[1, "\$conf['test'] = 1;\n"], | ||
[0, "\$conf['test'] = 0;\n"], | ||
// FIXME we probably want to handle other values better | ||
]; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters