youngguns-nl / moneybird_php_api

A PHP Library for the MoneyBird API
http://www.moneybird.nl
MIT License
37 stars 14 forks source link

Transport decorator that logs request and responses #80

Closed roelvanduijnhoven closed 8 years ago

roelvanduijnhoven commented 8 years ago

This PR introduces a decorator that one can use to configure a Transport object such that it logs to a PSR-3 valid object.

I have found myself needing this for debugging purposes. This is a WIP that I backported from our own system. If I get green light and you are willing to merge such feature, I will finish the PR.

Left to do:

pluijm commented 8 years ago

Hi Roel,

Thanks for adding this, I will close this PR. Please open a new one if you think it's ready to merge.

roelvanduijnhoven commented 8 years ago

Allright.

The current test suit fails out of the box on my PC. To reproduce:

  1. clone repo
  2. move in tests dir
  3. run phpunit .

What am I doing wrong?

pluijm commented 8 years ago

you have to configure the test. Create a my-config.php and configure: $config = array( 'clientname' => '', 'username' => '', 'password' => '', 'authType' => 'http', 'oauth' => array( 'consumerKey' => '', 'consumerSecret' => '', 'token' => '', 'tokenSecret' => '', ), 'testcontact' => '', );