TinCanPHP icon indicating copy to clipboard operation
TinCanPHP copied to clipboard

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

Open brianjmiller opened this issue 9 years ago • 1 comments

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.

brianjmiller avatar Aug 22 '16 19:08 brianjmiller

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.

WillSkates avatar Aug 26 '16 10:08 WillSkates