コード例 #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 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);
 }