diff options
Diffstat (limited to 'www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php')
-rw-r--r-- | www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php b/www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php new file mode 100644 index 00000000..eec970d9 --- /dev/null +++ b/www/wiki/vendor/param-processor/param-processor/tests/Unit/SettingsTest.php @@ -0,0 +1,42 @@ +<?php + +namespace ParamProcessor\Tests\Unit; + +use ParamProcessor\Settings; +use PHPUnit\Framework\TestCase; + +/** + * @covers \ParamProcessor\Settings + * + * @licence GNU GPL v2+ + * @author Jeroen De Dauw < jeroendedauw@gmail.com > + */ +class SettingsTest extends TestCase { + + public function constructorProvider() { + $settingArrays = [ + [ [] ], + [ [ 'foo' => 'bar' ] ], + [ [ 'foo' => 'bar', 'baz' => 'BAH' ] ], + [ [ '~[,,_,,]:3' => [ 9001, 4.2 ] ] ], + ]; + + return $settingArrays; + } + + /** + * @dataProvider constructorProvider + * + * @param array $settings + */ + public function testConstructor( array $settings ) { + $settingsObject = new Settings( $settings ); + + foreach ( $settings as $name => $value ) { + $this->assertEquals( $value, $settingsObject->get( $name ) ); + } + + $this->assertTrue( true ); + } + +} |