diff options
Diffstat (limited to 'www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php')
-rw-r--r-- | www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php new file mode 100644 index 00000000..2fb31db1 --- /dev/null +++ b/www/wiki/vendor/param-processor/param-processor/tests/Integration/Definitions/StringParamTest.php @@ -0,0 +1,45 @@ +<?php + +namespace ParamProcessor\Tests\Integration\Definitions; + +/** + * @licence GNU GPL v2+ + * @author Jeroen De Dauw < jeroendedauw@gmail.com > + */ +class StringParamTest extends ParamDefinitionTest { + + /** + * @see ParamDefinitionTest::valueProvider + * + * @param boolean $stringlyTyped + * + * @return array + */ + public function valueProvider( $stringlyTyped = true ) { + return [ + 'empty' => [ + [ 'ohi there', true, 'ohi there' ], + [ 4.2, false ], + [ [ 42 ], false ], + ], + 'values' => [ + [ 'foo', true, 'foo' ], + [ '1', true, '1' ], + [ 'yes', true, 'yes' ], + [ 'bar', false ], + [ true, false ], + [ 0.1, false ], + [ [], false ], + ], + ]; + } + + /** + * @see ParamDefinitionTest::getType + * @return string + */ + public function getType() { + return 'string'; + } + +} |