We are implementing Luca Degasperi's OAuth 2 server in our REST app.
The integration seem to work very well, but a crucial server call seems to fail during unit tests with PHPUnit. We can easily retrieve the token bearer's id with:
ResourceServer::getOwnerId()
But this seem to always return 0 when called during a unit test. The authentication part works well under unit tests.
Is there something specific we need to do to get the ResourceServer prepped when setting up the test fixture?
Had super help from the author and came up with a workable solution: https://gist.github.com/JannieT/9659047
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community