예제 #1
0
 /**
  * @dataProvider mockProvider
  * @param FaucetClient $obj
  * @param PHPUnit_Framework_MockObject_MockObject|ApiContext $mockApiContext
  * @param PHPUnit_Framework_MockObject_MockObject|BlockCypherRestCall $mockBlockCypherRestCall
  */
 public function testFundAddress($obj, $mockApiContext, $mockBlockCypherRestCall)
 {
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(FaucetResponseTest::getJson()));
     $faucetResponse = FaucetResponseTest::getObject();
     $result = $obj->fundAddress('CFqoZmZ3ePwK5wnkhxJjJAQKJ82C7RJdmd', 100000, $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
     $this->assertEquals($faucetResponse, $result);
 }
예제 #2
0
 /**
  * @dataProvider mockProvider
  * @param Faucet $obj
  */
 public function testFundAddress($obj, $mockApiContext)
 {
     $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock();
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(FaucetResponseTest::getJson()));
     $faucetResponse = FaucetResponseTest::getObject();
     /** @noinspection PhpParamsInspection */
     $result = $obj->fundAddress('CFqoZmZ3ePwK5wnkhxJjJAQKJ82C7RJdmd', 100000, $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
     $this->assertEquals($faucetResponse, $result);
 }