Пример #1
0
 /**
  * @dataProvider mockProvider
  * @param AddressClient $obj
  * @param PHPUnit_Framework_MockObject_MockObject|ApiContext $mockApiContext
  * @param PHPUnit_Framework_MockObject_MockObject|BlockCypherRestCall $mockBlockCypherRestCall
  */
 public function testCreate($obj, $mockApiContext, $mockBlockCypherRestCall)
 {
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(AddressKeyChainTest::getJson()));
     $result = $obj->create(null, $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
 }
Пример #2
0
 /**
  * @dataProvider mockProvider
  * @param Address $obj
  */
 public function testCreate($obj, $mockApiContext)
 {
     $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock();
     $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(AddressKeyChainTest::getJson()));
     /** @noinspection PhpParamsInspection */
     $result = $obj->create(null, $mockApiContext, $mockBlockCypherRestCall);
     $this->assertNotNull($result);
 }