Permalink
Browse files

adding check for no required value set on password

  • Loading branch information...
tr
tr committed Aug 1, 2012
1 parent d60d630 commit 6e75fc6fb5f9ea01ff7e38a871dab81dfd097b93
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/Zend/Form/Annotation/AnnotationBuilderTest.php
@@ -37,12 +37,13 @@ public function testCanCreateFormFromStandardEntity()
$username = $form->get('username');
$this->assertInstanceOf('Zend\Form\Element', $username);
- $attribute = $username->getAttribute('required');
- $this->assertEquals('required', $attribute);
+ $this->assertEquals('required', $username->getAttribute('required'));
+
$password = $form->get('password');
$this->assertInstanceOf('Zend\Form\Element', $password);
$attributes = $password->getAttributes();
$this->assertEquals(array('type' => 'password', 'label' => 'Enter your password', 'name' => 'password'), $attributes);
+ $this->assertNull($password->getAttribute('required'));
$filter = $form->getInputFilter();
$this->assertTrue($filter->has('username'));

0 comments on commit 6e75fc6

Please sign in to comment.