mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-09 13:36:07 +09:00
Removed testlogError() method from Stripe gateway test
This commit is contained in:
1 parent
125a943020
commit
13c52d528c
1 file changed
-33
@@ -160,39 +160,6 @@ class Payment_Adapter_StripeTest extends PHPUnit_Framework_TestCase {
|
||||
$this->assertEquals($expectedTitle, $result);
|
||||
}
|
||||
|
||||
public function testlogError()
|
||||
{
|
||||
$di = new Box_Di();
|
||||
$di['config'] = array('debug' => false);
|
||||
|
||||
$transactionModel = new Model_Transaction();
|
||||
$transactionModel->loadBean(new \RedBeanPHP\OODBBean());
|
||||
|
||||
$dbMock = $this->getMockBuilder('\Box_Database')->getMock();
|
||||
$dbMock->expects($this->atLeastOnce())
|
||||
->method('store')
|
||||
->with($transactionModel);
|
||||
$di['db'] = $dbMock;
|
||||
|
||||
$bodyArr = array(
|
||||
'error' => array(
|
||||
'type' => 'custom',
|
||||
'message' => 'Unit tests',
|
||||
)
|
||||
);
|
||||
|
||||
$exceptionMock = $this->getMockBuilder('Stripe\\Error\\Card')->disableOriginalConstructor()->getMock();
|
||||
$exceptionMock->expects($this->atLeastOnce())
|
||||
->method('getJsonBody')
|
||||
->willReturn($bodyArr);
|
||||
|
||||
$adapter = new Payment_Adapter_Stripe($this->defaultConfig);
|
||||
$adapter->setDi($di);
|
||||
|
||||
$this->setExpectedException('Exception', $bodyArr['error']['message']);
|
||||
$adapter->logError($exceptionMock, $transactionModel);
|
||||
}
|
||||
|
||||
public function testget_test_pub_key()
|
||||
{
|
||||
$config = $this->defaultConfig;
|
||||
|
||||
Reference in new issue
Block a user