예제 #1
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     $this->_service = new Request();
     $this->_service->setConnectionClass(new Curl(API_TEST_KEY, API_HOST, array(CURLOPT_SSL_VERIFYPEER => SSL_VERIFY_PEER)));
     $this->_model = new Checksum();
     $this->_model->setChecksumType(Checksum::TYPE_PAYPAL);
     $this->_model->setAmount('200');
     $this->_model->setCurrency('EUR');
     $this->_model->setDescription('Dummy description');
     parent::setUp();
 }
예제 #2
0
 /**
  * Prepares the environment before running a test.
  */
 protected function setUp()
 {
     $this->_service = new Request();
     $this->_service->setConnectionClass(new Curl(API_TEST_KEY, API_HOST, array(CURLOPT_SSL_VERIFYPEER => SSL_VERIFY_PEER)));
     parent::setUp();
 }
예제 #3
0
 /**
  * Returns a mocked Curl Object
  * @param string $action Api Action
  * @param array $params Param Array for the action call
  * @param string $method httpMethod
  * @param array $response Array returned by the function
  * @return array Response Array
  */
 private function _getCurlMock($action, $params, $method, $response)
 {
     $this->_curlObjectMock->expects($this->any())->method('requestApi')->with($this->stringContains($action), $this->equalTo($params), $this->matches($method))->will($this->returnValue($response));
     $this->_request->setConnectionClass($this->_curlObjectMock);
     return $this->_curlObjectMock;
 }