예제 #1
0
 /**
  * @return AddressKeyChain|null
  */
 public function testCreate()
 {
     //$request = $this->operation['request']['body'];
     //$addressCreateResponse = new AddressKeyChain($request);
     $result = null;
     try {
         $result = Address::create(null, $this->apiContext, $this->mockBlockCypherRestCall);
     } catch (BlockCypherConnectionException $ex) {
         $this->fail($ex->getMessage());
     }
     $this->assertNotNull($result);
     $this->assertInstanceOf('\\BlockCypher\\Api\\AddressKeyChain', $result);
     return $result;
 }
예제 #2
0
 /**
  * @dataProvider mockProvider
  * @param Address $obj
  */
 public function testCreate($obj, $mockApiContext)
 {
     $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock();
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(AddressKeyChainTest::getJson()));
     /** @noinspection PhpParamsInspection */
     $result = $obj->create(null, $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
 }