JacobBennett / SendyPHP

A PHP class built to interface with the Sendy API
MIT License
133 stars 38 forks source link

Non live tests #13

Closed tylercollier closed 10 years ago

tylercollier commented 10 years ago

I updated the tests so they'd use a stub for the curl requests. That way they don't hit live servers.

I didn't add any tests. They're still quite minimal.

tylercollier commented 10 years ago

Another way this could have been done would be to use PHP-VCR. I think the stubbing is the best way, but I'm more pointing it out for anyone that hasn't seen how awesome PHP-VCR is.

JacobBennett commented 10 years ago

Thanks so much for your contributions @tylercollier. Sorry it has taken me a bit to get back to you. I'll take a look through and hopefully vet it this week. Been crazy busy here :)

JacobBennett commented 10 years ago

@tylercollier

image

any ideas?

tylercollier commented 10 years ago

I ran the tests as originally in the readme: php vendor/bin/phpunit src/test/SendyPHPTest.php. Sorry, I didn't try just phpunit. When I do, I get the same error as you.

Btw I got the idea for this from http://stackoverflow.com/a/7912399/135101.

JacobBennett commented 10 years ago

Yup that was the problem :+1: Can't follow my own instructions :smile: