예제 #1
0
 /**
  * @dataProvider mockProviderGetParamsValidation
  * @param Blockchain $obj
  * @param $mockApiContext
  * @param $params
  * @expectedException \InvalidArgumentException
  */
 public function testGetParamsValidationForParams($obj, $mockApiContext, $params)
 {
     $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock();
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(BlockchainTest::getJson()));
     /** @noinspection PhpUndefinedVariableInspection */
     /** @noinspection PhpParamsInspection */
     $obj->get("BTC.main", $params, $mockApiContext, $mockBlockCypherRestCall);
 }
예제 #2
0
 /**
  * @dataProvider mockProviderGetParamsValidation
  * @param BlockClient $obj
  * @param PHPUnit_Framework_MockObject_MockObject|ApiContext $mockApiContext
  * @param PHPUnit_Framework_MockObject_MockObject|BlockCypherRestCall $mockBlockCypherRestCall
  * @param $params
  * @expectedException \InvalidArgumentException
  */
 public function testGetParamsValidationForParams($obj, $mockApiContext, $mockBlockCypherRestCall, $params)
 {
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(BlockchainTest::getJson()));
     $obj->get(BlockchainTest::getObject()->getName(), $params, $mockApiContext, $mockBlockCypherRestCall);
 }