/** * @depends testSerializationDeserialization * @param Address $obj */ public function testGetters($obj) { $this->assertEquals($obj->getWallet(), WalletTest::getObject()); }
/** * @dataProvider mockProviderGetParamsValidation * @param HDWallet $obj * @param $mockApiContext * @param $params * @expectedException \InvalidArgumentException */ public function testGetMultipleParamsValidationForParams($obj, $mockApiContext, $params) { $mockBlockCypherRestCall = $this->getMockBuilder('\\BlockCypher\\Transport\\BlockCypherRestCall')->disableOriginalConstructor()->getMock(); $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue('[' . WalletTest::getJson() . ']')); $walletList = array(WalletTest::getObject()->getName()); /** @noinspection PhpUndefinedVariableInspection */ /** @noinspection PhpParamsInspection */ $obj->get($walletList, $params, $mockApiContext, $mockBlockCypherRestCall); }
/** * @dataProvider mockProvider * @param WalletClient $obj * @param PHPUnit_Framework_MockObject_MockObject|ApiContext $mockApiContext * @param PHPUnit_Framework_MockObject_MockObject|BlockCypherRestCall $mockBlockCypherRestCall */ public function testDelete($obj, $mockApiContext, $mockBlockCypherRestCall) { $mockBlockCypherRestCall->expects($this->any())->method('execute')->will($this->returnValue(true)); $result = $obj->delete(WalletTest::getObject()->getName(), array(), $mockApiContext, $mockBlockCypherRestCall); $this->assertNotNull($result); }