/**
  * @depends testCreate
  * @param $webHook WebHook
  * @return WebHook
  */
 public function testGet($webHook)
 {
     $result = WebHook::get($webHook->getId(), array(), $this->apiContext, $this->mockBlockCypherRestCall);
     $this->assertNotNull($result);
     $this->assertWebHooksAreEquivalent($webHook, $result);
     return $result;
 }
示例#2
0
 /**
  * @dataProvider mockProviderGetParamsValidation
  * @param WebHook $obj
  * @param $mockApiContext
  * @param $params
  * @expectedException \InvalidArgumentException
  */
 public function testGetMultipleParamsValidationForParams($obj, $mockApiContext, $params)
 {
     $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock();
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue('[' . WebHookTest::getJson() . ']'));
     $webHookList = array(WebHookTest::getObject()->getId());
     /** @noinspection PhpUndefinedVariableInspection */
     /** @noinspection PhpParamsInspection */
     $obj->get($webHookList, $params, $mockApiContext, $mockBlockCypherRestCall);
 }