Exemple #1
0
 /**
  * @expectedException Isign\Exception\QueryValidator
  * @expectedExceptionMessage Query parameters validation failed
  */
 public function testGetValidationFailed()
 {
     $violations = $this->getMockBuilder('Symfony\\Component\\Validator\\ConstraintViolationList')->disableOriginalConstructor()->getMock();
     $violations->method('count')->willReturn(1);
     $this->validatorStub->expects($this->once())->method('validate')->willReturn($violations);
     $this->client->get($this->methodStub);
 }
Exemple #2
0
 public function setUp()
 {
     $params = ['apiKey' => SANDBOX_API_KEY, 'sandbox' => true];
     if (defined('SANDBOX_URL')) {
         $params['sandboxUrl'] = SANDBOX_URL;
     }
     $log = false;
     // Uncomment to enable request/response debugging
     // $log = null;
     $this->client = Client::create($params, $log);
 }