Пример #1
0
 /**
  * @covers DmMailer\Form\SubscribeForm
  */
 public function testBuild()
 {
     $this->sut->build();
     $this->assertInstanceOf('Zend\\Form\\Element\\Hidden', $this->sut->get(Form::SUCCESS_URL));
     $this->assertInstanceOf('Zend\\Form\\Element\\Hidden', $this->sut->get(Form::FAILURE_URL));
     $this->assertInstanceOf('Zend\\Form\\Element\\Text', $this->sut->get(Form::FULL_NAME));
     $this->assertInstanceOf('Zend\\Form\\Element\\Email', $this->sut->get(Form::EMAIL_ADDRESS));
 }
Пример #2
0
 /**
  * @param ServiceLocatorInterface $serviceLocator
  *
  * @return SubscribeForm
  */
 public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $form = new SubscribeForm();
     $form->setInputFilter(new SubscribeInputFilter());
     return $form;
 }