Merge pull request #197 from onddo/tests-fixes-2

Some test fixes (2)
This commit is contained in:
Andrius Putna committed 2014-11-24 13:34:10 +02:00
commit 6a08a4dd86
6 files changed
+17 -1

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dataset>
<client id="1" aid="1" role="client" email="client@boxbilling.com" pass="89e495e7941cf9e40e6980d14a16bf023ccd4c91" tax_exempt="0" status="active" first_name="Demo" last_name="Client" phone_cc="1" phone="646-123-4567" company="BoxBilling" address_1="Wall Street 45" city="New York" state="NY" country="US" currency="USD" postcode="123456" created_at="2011-01-01T12:00:00+00:00" updated_at="2011-01-01T12:00:00+00:00"/>
<client_balance />
<pay_gateway id="1" name="Custom" gateway="Custom" enabled="1" config='{"vendor_nr":"1", "secret":123}'/>
<invoice id="1" client_id="1" hash="hash" currency="USD" status="unpaid" due_at="2014-01-01T12:00:00+00:00" created_at="2011-11-01T12:00:00+00:00" updated_at="2011-11-01T12:00:00+00:00"/>
<invoice_item id="1" invoice_id="1" type="custom" task="void" title="Payment for development services" period="" quantity="10" unit="hours" price="50" created_at="2011-01-01T12:00:00+00:00" updated_at="2011-01-01T12:00:00+00:00"/>
<transaction id="1" invoice_id="1" gateway_id="1" ip="123.123.123.123" validate_ipn="1" created_at="2011-01-01T12:00:00+00:00" updated_at="2011-01-01T12:00:00+00:00" ipn='{"get":{"bb_amount":"500", "bb_currency":"USD", "bb_id":"123"}}'/>
</dataset>
@@ -4,6 +4,8 @@
*/
class Payment_Adapter_CustomTest extends BBDbApiTestCase
{
protected $_initialSeedFile = 'gateway_Custom.xml';
public function testCustom()
{
$config = array(
@@ -11,8 +13,9 @@ class Payment_Adapter_CustomTest extends BBDbApiTestCase
'recurrent' => 'test',
);
$adapter = new Payment_Adapter_Custom($config);
$adapter->setDi($this->di);
$adapter->getConfig();
$adapter->getHtml($this->api_admin, 1);
$adapter->processTransaction();
$adapter->process();
}
}