@Toflar opened this Pull Request on October 26th 2018 Contributor

Hey everybody,

I'm using the getMatomoVersion endpoint to see if my Matomo setups are all up-to-date. I would like to also know if the PHP version they're all running on are maintained. Unfortunately there's no endpoint yet for that.

I'm very new to the code base of Matomo but actually very experienced in php and testing. Also followed your setup guide for the tests but when trying to run ./console tests:run unit it tried to connect to the db (which is very strange to me for unit tests) so I didn't explore more on it.

Feel free to guide me to the things I need to do to have this tested, I'll happily update the PR if you like this addition 😄

@fdellwing commented on October 26th 2018 Contributor

Hey @Toflar

please see https://travis-ci.org/matomo-org/matomo/builds/446616865 for your tests results (not all fails are your fault (but some are), just take a look if anything looks like it could be your fault ;))

@fdellwing commented on October 26th 2018 Contributor
@Toflar commented on October 26th 2018 Contributor

Oh nice, UI tests using screenshots, that's cool!
Anyway, I would've liked to add unit tests but the result is dynamic (depending on the running php version) so I couldn't just add the XML, I would've had to add quite some logic to it and so I tried to see how getMatomoVersion() is tested and it's not at all so :-(

@tsteur commented on October 28th 2018 Member

FYI: I quickly checked... the DB connection should be only needed to bootstrap the test system but the unit tests itself shouldn't connect to the DB.

@tsteur commented on October 31st 2018 Member

Looks good for me. Any thoughts @mattab ?

@mattab commented on November 2nd 2018 Member

LGTM :+1:

@tsteur commented on November 2nd 2018 Member

Cheers @Toflar

This Pull Request was closed on November 2nd 2018
Powered by GitHub Issue Mirror