public function testSendFileToUnsupportedProtocol() { $param = array('file' => $this->mockCurlRequestTrait->curl_file_create(D_APP_DIR . '/Assets/1.txt'), 'name' => 'test'); $url = 'xftp://127.0.0.1/56stgseaafs/asfasdf34tr/asdfasdfgadg/dfghgdfgdaf/asfdadsfasdf/fdhgdh/wqrwerafdsgdsfg/sdgsdfgfdsg/sdgsdfga'; $response = $this->mockCurlRequestTrait->rawSend($url, $param, 'POST'); $this->assertEquals('CURL_ERROR', $response->getError()); }
public function testSetRequestLoggerByInterface() { $logger2 = new CurlRequestLoggerInterfaceExtendMock(); $this->mockCurlRequestTrait->setRequestLogger('anotherLogger', $logger2); $url = 'http://127.0.0.1/ddd/ddd'; $response = $this->mockCurlRequestTrait->rawSend($url); $this->assertEquals($response->getRawResult(), $logger2->responseRawResult); }