コード例 #1
0
 /**
  * @dataProvider mockProvider
  * @param HDWallet $obj
  * @param $mockApiContext
  */
 public function testGet($obj, $mockApiContext)
 {
     $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock();
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(HDWalletTest::getJson()));
     /** @noinspection PhpParamsInspection */
     $result = $obj->get("walletName", array(), $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
 }
コード例 #2
0
 /**
  * @dataProvider mockProvider
  * @param HDWalletClient $obj
  * @param PHPUnit_Framework_MockObject_MockObject|ApiContext $mockApiContext
  * @param PHPUnit_Framework_MockObject_MockObject|BlockCypherRestCall $mockBlockCypherRestCall
  */
 public function testDelete($obj, $mockApiContext, $mockBlockCypherRestCall)
 {
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(true));
     $result = $obj->delete(HDWalletTest::getObject()->getName(), array(), $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
 }