protected function setHttpFixtures($fixtures) { $plugin = new \Guzzle\Plugin\Mock\MockPlugin(); foreach ($fixtures as $fixture) { if ($fixture instanceof \Exception) { $plugin->addException($fixture); } else { $plugin->addResponse($fixture); } } $this->getHttpClient()->addSubscriber($plugin); }