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
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.
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.