/**
  * Tests construct.
  */
 public function testConstruct()
 {
     /** @var SourceAdapterInterface $adapter */
     $adapter = $this->getMockBuilder('Transfer\\Adapter\\SourceAdapterInterface')->getMock();
     /** @var Response $response */
     $response = $this->getMockBuilder('Transfer\\Adapter\\Transaction\\Response')->getMock();
     $event = new PostAdapterReceiveEvent($adapter, $response, 10);
     $this->assertSame($adapter, $event->getSourceAdapter());
     $this->assertSame($response, $event->getResponse());
     $this->assertEquals(10, $event->getElapsedTime());
 }
Exemple #2
0
 /**
  * Logs post adapter receive.
  *
  * @param Events\PostAdapterReceiveEvent $event
  */
 public function logPostAdapterReceiveEvent(Events\PostAdapterReceiveEvent $event)
 {
     $source = $event->getSourceAdapter();
     $this->logger->info(sprintf('Received data from adapter "%s"', get_class($source)));
 }