Exemplo n.º 1
0
 /**
  * @test
  * @loadFixture data
  *
  * @doNotIndex catalog_product_price
  */
 public function addMessageUnknownCustomerTest()
 {
     $customer = new Varien_Object();
     $customer->setName('John Doe');
     $customer->setEmail('*****@*****.**');
     $this->_model->addMessage('message 1', $customer, false, true);
     $message = Mage::getModel('helpdesk/message')->getCollection()->getLastItem();
     $this->assertEquals('message 1', $message->getBody());
     $this->assertEquals(2, $message->getTicketId());
     $this->assertEquals(Mirasvit_Helpdesk_Model_Config::MESSAGE_PUBLIC, $message->getType());
     $this->assertEquals('John Doe', $message->getCustomerName());
     $this->assertEquals('*****@*****.**', $message->getCustomerEmail());
     $this->assertEquals('John Doe', $this->_model->getLastReplyName());
 }