Ejemplo n.º 1
0
 function it_should_authenticate_request(RequestEvent $requestEvent, Request $request)
 {
     $requestEvent->getRequest()->willReturn($request);
     $request->setHeader('api-key', 'foo')->shouldBeCalled();
     $this->setOptions(['key' => 'foo']);
     $this->auth($requestEvent);
 }
Ejemplo n.º 2
0
 /**
  * @param RequestEvent $request
  */
 public function auth(RequestEvent $request)
 {
     $request->getRequest()->setHeader('api-key', $this->options['key']);
 }