/** * @param string $response * @param array $processableErrors * @param null|string $exception * @param string $exceptionMessage * @param null|int $exceptionCode * @dataProvider callDataProvider */ public function testCall($response, $processableErrors, $exception, $exceptionMessage = '', $exceptionCode = null) { if (isset($exception)) { $this->setExpectedException($exception, $exceptionMessage, $exceptionCode); } $this->curl->expects($this->once())->method('read')->will($this->returnValue($response)); $this->model->setProcessableErrors($processableErrors); $this->model->call('some method', ['data' => 'some data']); }