Exemplo n.º 1
0
 /**
  * @covers Gloubster\Message\Job\AbstractJob::addReceipt
  * @covers Gloubster\Message\Job\AbstractJob::getReceipts
  */
 public function testAddReceipt()
 {
     $this->object->setReceipts(array());
     $this->assertCount(0, $this->object->getReceipts());
     $receipt = $this->getMockBuilder('Gloubster\\Receipt\\ReceiptInterface')->disableOriginalConstructor()->getMock();
     $this->object->addReceipt($receipt);
     $this->assertEquals(array($receipt), $this->object->getReceipts());
     $this->object->addReceipt($receipt);
     $this->assertEquals(array($receipt, $receipt), $this->object->getReceipts());
 }