예제 #1
0
 /**
  * @covers Application_Form_Confirmation::__construct
  * @covers Application_Form_Confirmation::init
  */
 public function testConstructForm()
 {
     $form = new Application_Form_Confirmation('Opus_Licence');
     $this->assertEquals('Opus_Licence', $form->getModelClass());
     $this->assertEquals(3, count($form->getElements()));
     $this->assertNotNull($form->getElement('Id'));
     $this->assertNotNull($form->getElement('ConfirmYes'));
     $this->assertNotNull($form->getElement('ConfirmNo'));
     $this->assertNotNull($form->getLegend());
     $this->assertEquals(3, count($form->getDecorators()));
     $this->assertNotNull($form->getDecorator('ViewScript'));
     $this->assertNotNull($form->getDecorator('Fieldset'));
     $this->assertNotNull($form->getDecorator('Form'));
     $this->assertEquals('headline', $form->getDecorator('Fieldset')->getOption('class'));
 }