X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FFormOptionsInitializationTest.php;h=dcaf1f7957d86382791e0a148bfa8138616f61f8;hb=e5facc46bc170c302438f60849041b0d6be75e82;hp=fb2304dca1ec9331688200dbc6dc925d97788074;hpb=760b1e8c3baa03f27900d227faba53842524023f;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/FormOptionsInitializationTest.php b/tests/phpunit/includes/FormOptionsInitializationTest.php index fb2304dca1..dcaf1f7957 100644 --- a/tests/phpunit/includes/FormOptionsInitializationTest.php +++ b/tests/phpunit/includes/FormOptionsInitializationTest.php @@ -35,7 +35,6 @@ class FormOptionsInitializationTest extends MediaWikiTestCase { */ protected $object; - /** * A new fresh and empty FormOptions object to test initialization * with. @@ -45,39 +44,45 @@ class FormOptionsInitializationTest extends MediaWikiTestCase { $this->object = new FormOptionsExposed(); } + /** + * @covers FormOptionsExposed::add + */ public function testAddStringOption() { $this->object->add( 'foo', 'string value' ); $this->assertEquals( - array( - 'foo' => array( + [ + 'foo' => [ 'default' => 'string value', 'consumed' => false, 'type' => FormOptions::STRING, 'value' => null, - ) - ), + ] + ], $this->object->getOptions() ); } + /** + * @covers FormOptionsExposed::add + */ public function testAddIntegers() { $this->object->add( 'one', 1 ); $this->object->add( 'negone', -1 ); $this->assertEquals( - array( - 'negone' => array( + [ + 'negone' => [ 'default' => -1, 'value' => null, 'consumed' => false, 'type' => FormOptions::INT, - ), - 'one' => array( + ], + 'one' => [ 'default' => 1, 'value' => null, 'consumed' => false, 'type' => FormOptions::INT, - ) - ), + ] + ], $this->object->getOptions() ); }