/**
  * @depends testGet
  * @param $webHook WebHook
  * @return WebHook[]
  */
 public function testGetMultiple($webHook)
 {
     $webHookList = array($webHook->getId(), $webHook->getId());
     $result = WebHook::getMultiple($webHookList, array(), $this->apiContext, $this->mockBlockCypherRestCall);
     $this->assertNotNull($result);
     $found = false;
     $foundObject = null;
     foreach ($result as $webHookObject) {
         if ($webHookObject->getId() == $webHook->getId()) {
             $found = true;
             $foundObject = $webHookObject;
             break;
         }
     }
     $this->assertTrue($found, "The Created WebHook was not found in the get list");
     $this->assertEquals($webHook->getId(), $foundObject->getId());
     return $result;
 }
Beispiel #2
0
 /**
  * @dataProvider mockProvider
  * @param WebHook $obj
  */
 public function testGetMultiple($obj, $mockApiContext)
 {
     $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock();
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue('[' . WebHookTest::getJson() . ']'));
     $webHookList = array(WebHookTest::getObject()->getId());
     $result = $obj->getMultiple($webHookList, array(), $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
     $this->assertEquals($result[0], WebHookTest::getObject());
 }