Inheritance: extends Symfony\Component\EventDispatcher\Event
 function it_should_start_request(Stopwatch $stopwatch, RequestEvent $event, RequestInterface $request, ClientInterface $client)
 {
     $event->getRequest()->willReturn($request);
     $event->getMethod()->willReturn('soapMethod');
     $event->getClient()->willReturn($client);
     $stopwatch->start(Argument::type('string'))->shouldBeCalled();
     $this->setRequest($event);
     $this->getMethod()->shouldBe('soapMethod');
     $this->getRequest()->shouldBe($request);
     $this->getHash()->shouldStartWith('Double\\ClientInterface');
 }
示例#2
0
 /**
  * @param RequestEvent $event
  */
 public function onClientRequest(RequestEvent $event)
 {
     $this->logger->info(sprintf('[phpro/soap-client] request: call "%s" with params %s', $event->getMethod(), print_r($event->getRequest(), true)));
 }
 /**
  * Process soap request
  * @param RequestEvent $e
  */
 public function setRequest(RequestEvent $e)
 {
     $this->request = $e->getRequest();
     $this->method = $e->getMethod();
     $this->clientName = get_class($e->getClient());
     $this->hash = uniqid(sprintf('%s::%s ', $this->clientName, $this->method), true);
     $this->startTimer();
 }