/** * Test single model response that fails validation * @depends testClientConstruct * @group mock * @expectedException \Guzzle\Service\Exception\ValidationException */ public function testModelResponseFailure(Client $client) { // fake a response with missing required property and extra invalid one $plugin = new MockPlugin(); $plugin->addResponse(new Response(200, array(), '{"baz":1}')); $client->addSubscriber($plugin); $response = $client->test(); }