public function testPrepareRequestShouldThrowExceptionOnInvalidFormat() { $this->restClient->setRequestFormat('invalid format'); $this->setExpectedException('\\Matryoshka\\Service\\Api\\Exception\\InvalidFormatException'); $this->restClient->prepareRequest('post', null, ['foo' => 'baz']); }