You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got few unexpected method exceptions when doing API calls (issue #5 ) and since there were no tests to validate actual xml payload, I implemented my own.
class InvoiceServiceTest extends \ServiceTest
{
public function testCreateBlankOrder()
{
$this->ifs->invoices->createBlankOrder(111, 'hello world', new \DateTime('2014-08-08'), 2, 3);
$this->verifyCall('InvoiceService.createBlankOrder');
}
}
By default the final request will be validated against a preset xml file under tests/Infusionsoft/Api/fixtures, but it can be overridden.
I'm using aspect mock and it requires php 5.4. Thought of sharing it with you guys.
Thanks.
The text was updated successfully, but these errors were encountered:
I got few unexpected method exceptions when doing API calls (issue #5 ) and since there were no tests to validate actual xml payload, I implemented my own.
https://github.com/sahanh/infusionsoft-php/tree/develop
Here's how an actual service call is validated
By default the final request will be validated against a preset xml file under tests/Infusionsoft/Api/fixtures, but it can be overridden.
I'm using aspect mock and it requires php 5.4. Thought of sharing it with you guys.
Thanks.
The text was updated successfully, but these errors were encountered: