Ejemplo n.º 1
0
 /**
  * @dataProvider mockProvider
  * @param TXClient $obj
  * @param PHPUnit_Framework_MockObject_MockObject|ApiContext $mockApiContext
  * @param PHPUnit_Framework_MockObject_MockObject|BlockCypherRestCall $mockBlockCypherRestCall
  */
 public function testSend($obj, $mockApiContext, $mockBlockCypherRestCall)
 {
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(TXSkeletonTest::getJson()));
     $result = $obj->send(TXSkeletonTest::getObject(), $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
 }
 /**
  * @param TXSkeleton $txSkeleton
  * @param $coinSymbol
  * @param $token
  * @return TXSkeleton
  */
 public function send(TXSkeleton $txSkeleton, $coinSymbol, $token)
 {
     $apiContext = $this->apiContextFactory->getApiContext($coinSymbol, $token);
     $txClient = new TXClient($apiContext);
     $txSkeleton = $txClient->send($txSkeleton);
     return $txSkeleton;
 }