public function testGetValue() { $form = new Form(); $submitElement = $form->submit('submit', 'label'); $form->handle(new FormData('post', [$form->getUid() => 1, 'submit' => ''])); static::assertEquals('label', $submitElement->getValue()); }
/** * */ public function testIsSubmittedTrue() { $form = new Form(); $form->setName('test-form'); $form->handle(new FormData('post', ['test-form' => 1])); $this->assertEquals(true, $form->isSubmitted()); $form = new Form(); $form->submit('test-submit', 'test-value'); $form->handle(new FormData('post', [$form->getUid() => 1])); $this->assertEquals(true, $form->isSubmitted()); }