/** * @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 mockProviderGetParamsValidation * @param HDWalletClient $obj * @param PHPUnit_Framework_MockObject_MockObject|ApiContext $mockApiContext * @param PHPUnit_Framework_MockObject_MockObject|BlockCypherRestCall $mockBlockCypherRestCall * @param $params * @expectedException \InvalidArgumentException */ public function testGetMultipleParamsValidationForParams($obj, $mockApiContext, $mockBlockCypherRestCall, $params) { $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue('[' . HDWalletTest::getJson() . ']')); $walletList = array(HDWalletTest::getObject()->getName()); $obj->getMultiple($walletList, $params, $mockApiContext, $mockBlockCypherRestCall); }