public function testVerificaSeOsDadosForamInseridos()
 {
     $textarea = new Textarea();
     $textarea->setId("textareaMsg");
     $textarea->setName("mensagem");
     $textarea->setClass("form-control");
     $textarea->setProtected("protected");
     $textarea->setLabel("Mensagem");
     $textarea->setAlert("Erro no field.");
     $textarea->setValue("valor");
     $textarea->setRows(2);
     $this->assertEquals("textareaMsg", $textarea->getId());
     $this->assertEquals("mensagem", $textarea->getName());
     $this->assertEquals("form-control", $textarea->getClass());
     $this->assertEquals("protected", $textarea->getProtected());
     $this->assertEquals("Mensagem", $textarea->getLabel());
     $this->assertEquals("Erro no field.", $textarea->getAlert());
     $this->assertEquals("valor", $textarea->getValue());
     $this->assertEquals(2, $textarea->getRows());
 }
예제 #2
0
 public function getValue()
 {
     if ($this->textarea !== null) {
         return nl2br(htmlspecialchars($this->textarea->getValue()));
     }
     return BOL_TextFormatService::getInstance()->processWsForOutput($this->value, array('buttons' => $this->buttons));
 }