Example #1
0
 /**
  * Test that parsing and composing a valid URI returns the same URI
  *
  * @param array $posts
  * @param AbstractField[] $fields
  * @param string $getValueName
  *
  * @dataProvider formValueProvider
  */
 public function testGetValue(array $posts, array $fields, string $getValueName)
 {
     self::request()->setPosts($posts);
     self::request()->setMethod('POST');
     $form = new Form();
     foreach ($fields as $field) {
         $form->add($field);
     }
     $this->assertEquals($form->getValue($getValueName), $posts[$getValueName]);
 }