Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 /**
  *
  */
 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());
 }