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 😄
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 ;))
At least this screen is failing because of the change: https://builds-artifacts.matomo.org/matomo-org/matomo/3.x-dev/30825/UIIntegrationTest_api_listing.png
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 :-(
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.