예제 #1
0
 public function testRenderNotAlwaysEmpty()
 {
     $field = new PasswordField('name', array('always_empty' => false));
     $field->setData('asdf');
     $html = '<input id="name" name="name" value="asdf" type="password" />';
     $this->assertEquals($html, $field->render());
 }
 public function testGetDisplayedDataWithAlwaysEmptyDisabled()
 {
     $field = new PasswordField('name', array('always_empty' => false));
     $field->setData('before');
     $this->assertSame('', $field->getDisplayedData());
     $field->submit('after');
     $this->assertSame('after', $field->getDisplayedData());
 }