Пример #1
0
 /**
  * @Given there is a openl10n server serving a :resource resource
  */
 public function thereIsAOpenl10nServerAtUri($resource)
 {
     $this->guzzleMockHandlerList[$resource] = new \GuzzleHttp\Handler\MockHandler();
     $handler = \GuzzleHttp\HandlerStack::create($this->guzzleMockHandlerList[$resource]);
     $this->guzzleTransactionHistory[$resource] = array();
     $handler->push(\GuzzleHttp\Middleware::history($this->guzzleTransactionHistory[$resource]));
     $client = new \GuzzleHttp\Client(['handler' => $handler]);
     $this->application->getContainer()->get('api')->getEntryPoint($resource)->setClient($client);
 }