Open chriscct7 opened 9 years ago
Agreed.
Can do!
Assigning to Dan per above. Might take back towards the end if it needs help
While release/2.6
is going through beta I'm going to try and get some more unit tests for the API in place, specifically with the differences between v1
and v2
(introduced in 2.6)
First pass at getting our API able to be unit tested. Now that I have it working locally, will see if Travis likes it, and keep working from here to see if we can get some more coverage on it prior to 2.6 release.
Not quite sure why, this passes locally 100% but on Travis any tests that require the API Authentication fail. I'd say it's related to $wp_query
not getting correctly passed, however, other parts of the $wp_query
variable end in the right place. I'll come back to this a bit later.
Could you try using the go_to() helper instead of manually setting query vars?
On Friday, May 27, 2016, Chris Klosowski notifications@github.com wrote:
Not quite sure why, this passes locally 100% but on Travis any tests that require the API Authentication fail. I'd say it's related to $wp_query not getting correctly passed, however, other parts of the $wp_query variable end in the right place. I'll come back to this a bit later.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/easydigitaldownloads/easy-digital-downloads/issues/3113#issuecomment-222274938, or mute the thread https://github.com/notifications/unsubscribe/AA_HfUhRVcwUxtLNqtVNRWE1IcBLtaK0ks5qF3_vgaJpZM4DgibQ .
@pippinsplugins I'll give that a shot next.
@pippinsplugins go_to()
doesn't work because it's outside the context of the unit test's instantiation of the API
. It basically just returns data like the API was never called.
Boo
Punting this from 2.6...I need to build a local docker container of the Travis Environment so I can mess with this to figure out why it'll pass locally, and not on Travis.
Normally I'd advocate against opening tickets regarding code coverage, but the EDD API class which people are starting to use and rely on has only 24% coverage, so low that we're starting to get reports of issues as people and extensions start using it more frequently like https://github.com/easydigitaldownloads/Easy-Digital-Downloads/issues/2979. For being the main API, we should try to get it to at least 80% for 2.4.