Skip to content
Snippets Groups Projects

Add unit tests for Species class

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.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Francesco Abeni requested review from @felip

    requested review from @felip

  • assigned to @felip

  • Felip Manyer i Ballester approved this merge request

    approved this merge request

  • mentioned in commit e29718cb

  • Thanks a lot for this first step! I was able to run tests just fine. I'll update the .gitlab-ci.yml file so they're fired on every commit.

    I was just wondering, why PHPUnit 8 instead of 9?

    As for versioning, if you think this project should be released as stable, I can just create a new 1.0.0 release if this looks correct to you.

  • I'll update the .gitlab-ci.yml file so they're fired on every commit.

    Good!

    I was just wondering, why PHPUnit 8 instead of 9?

    That's not my choice. The composer file says that project supports PHP 7.2, and PHPunit 9 requires PHP 7.3. I guess we may bump PHP version before stable release, but that's up to you and I don't think this is a priority right now. A wider compatibility may increase project adoption.

    As for versioning, if you think this project should be released as stable, I can just create a new 1.0.0 release if this looks correct to you.

    Let me add a few more tests first, so that we have a very basic coverage of all public methods. After that yes, you should definitely release it as stable. Thank you!

  • I guess we may bump PHP version before stable release, but that's up to you and I don't think this is a priority right now. A wider compatibility may increase project adoption.

    Oh, I think we still host an older version of a website that uses PHP 7.2 (hopefully not for long). As you said, this is not a priority right now.

    Let me add a few more tests first, so that we have a very basic coverage of all public methods. After that yes, you should definitely release it as stable.

    All right!

Please register or sign in to reply
Loading