/** * @expectedException Tufesa\Service\Exceptions\ResponseException */ public function test_problem_with_tufesa_get_seat_map_should_raise_an_exception() { $response = new \Guzzle\Http\Message\Response(200); $response->setBody('{"_id": "1.0", "_Response": { "_revAuth": null, "resultField": { "_id": "666", "_message": "SOME DUMMY MESSAGE HERE" }}}'); $plugin = new \Guzzle\Plugin\Mock\MockPlugin(); $plugin->addResponse($response); $guzzleClient = new GuzzleClient(); $guzzleClient->addSubscriber($plugin); $tufesaClient = new Client($guzzleClient); $from = "GDL"; $to = "OBR"; $schedule = 866926; $seatMap = $tufesaClient->getSeatMap($from, $to, $schedule); $this->assertInstanceOf('Tufesa\\Service\\Type\\SeatMap', $seatMap); }