예제 #1
0
 /**
  * @covers DmMailer\Manager\QueueItem
  */
 public function testTrackQueueItemReturnsTrueOnSuccess()
 {
     $queueItemMock = $this->getMockBuilder('DmMailer\\Entity\\QueueItem')->disableOriginalConstructor()->setMethods(['setIsTracked'])->getMock();
     $this->queueItemRepoMock->expects($this->any())->method('getOneBySecurityKey')->will($this->returnValue($queueItemMock));
     $this->queueItemRepoMock->expects($this->any())->method('getOneBySecurityKey');
     $actualResult = $this->sut->trackQueueItem('securityKey');
     $this->assertTrue($actualResult);
 }
예제 #2
0
 /**
  * @return \Zend\Http\PhpEnvironment\Response
  */
 public function trackAction()
 {
     if (!$this->manager->trackQueueItem($this->params('securityKey'))) {
         return '';
     }
     return $this->manager->getImageResponse($this->getResponse());
 }