/** * @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); }
/** * @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); }