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