/** * @return WebHook */ public function testCreate() { $request = $this->operation['request']['body']; $obj = new WebHook($request); // Adding a random url request to make it unique $obj->setUrl($obj->getUrl() . '?rand=' . uniqid()); $result = null; try { $result = $obj->create($this->apiContext, $this->mockBlockCypherRestCall); } catch (BlockCypherConnectionException $ex) { $this->fail($ex->getMessage()); } $this->assertNotNull($result); $this->assertInstanceOf('\\BlockCypher\\Api\\WebHook', $result); return $result; }
/** * @expectedException \InvalidArgumentException * @expectedExceptionMessage url is not a fully qualified URL */ public function testUrlValidationForUrl() { $obj = new WebHook(); $obj->setUrl(null); }