RusticiSoftware / TinCanPHP

PHP library for the Experience API (Tin Can API)
http://rusticisoftware.github.io/TinCanPHP/
Apache License 2.0
87 stars 78 forks source link

Switch to using a mock HTTP request object for RemoteLRS unit tests #70

Open brianjmiller opened 8 years ago

brianjmiller commented 8 years ago

Would be much easier to test the underlying LRS requirements if the HTTP object could be mocked such that we can make sure the various parts of it are setup and executed correctly.

WillSkates commented 8 years ago

Testing against an actual service is really benefitial here but your point still stands.

A good compromise would be if we could run the same test suite against multiple LRS implementations and mock the ones we don't have an endpoint to test against. For example Learning Locker as @johnpbloch pointed out in #47.

Have you seen Guzzle's stream handler? I wonder if it would be easier to use that instead of rearchitecting the HTTP logic that's already in the lib.