Beispiel #1
0
 public function testRenderEmailInput()
 {
     $email = new Email('email');
     $expected = '<input type="email" name="email">';
     $result = $email->render();
     $this->assertEquals($expected, $result);
 }
 public function email($name)
 {
     $email = new Email($name);
     if (!is_null($value = $this->getValueFor($name))) {
         $email->value($value);
     }
     return $email;
 }
 public function email($name, $defaultValue = null)
 {
     $email = new Email($name);
     if (!is_null($value = $this->getValueFor($name))) {
         $email->value($value);
     }
     $email->defaultValue($defaultValue);
     if ($this->hasError($name)) {
         $email->setError();
     }
     return $email;
 }