PHP GBIF merge requestshttps://gitlab.res-telae.cat/restelae/php-gbif/-/merge_requests2022-05-09T15:27:34Zhttps://gitlab.res-telae.cat/restelae/php-gbif/-/merge_requests/5Fixes #32022-05-09T15:27:34ZFrancesco AbeniFixes #3We really should mock GBIF response so we only test our code; that requires a bit of refactoring where we extract the actual request service from the existing classes.
Meanwhile, I simplified the test so we only check that suggested nam...We really should mock GBIF response so we only test our code; that requires a bit of refactoring where we extract the actual request service from the existing classes.
Meanwhile, I simplified the test so we only check that suggested name matches the suggested prefix.https://gitlab.res-telae.cat/restelae/php-gbif/-/merge_requests/4Add unit tests for Occurrences class2022-05-09T08:00:29ZFrancesco AbeniAdd unit tests for Occurrences classAgain, this is a very basic first step. Tests may be improved later on.Again, this is a very basic first step. Tests may be improved later on.Felip Manyer i BallesterFelip Manyer i Ballesterhttps://gitlab.res-telae.cat/restelae/php-gbif/-/merge_requests/3Add unit tests for Species class2022-05-06T19:38:37ZFrancesco AbeniAdd unit tests for Species classI'm really into small iterations. This first attempt at unit tests is far from perfect (it only covers the Species class and it should mock GBIF response instead of actually contacting the GBIF API) but I still feel that is better to sta...I'm really into small iterations. This first attempt at unit tests is far from perfect (it only covers the Species class and it should mock GBIF response instead of actually contacting the GBIF API) but I still feel that is better to start with small steps.. Please provide your feedback in the most direct and straightforward way, as we're both grown professionals and there is no need / time for diplomacy :-)
BTW apart from automated tests the code looks good enough to me. I don't think there's much that prevents it from being released as stable. Sure, I can see some possible improvements (mostly about splitting it into smaller and more dedicated classes) but those may come later.Felip Manyer i BallesterFelip Manyer i Ballester