Skip to end of metadata
Go to start of metadata

Some starting tasks and thoughts

  1. All the directory paths below are given assuming you're in tests/phpunit directory.
  2. Open api/v2/ActivityTest.php and api/v2/ContactTest.php in your editor window and keep it open throughout your work - it contains good examples that can be referred to!
  3. Open PhpUnit documentation in your browser window and refer to it all the time - it can save you quite a lot of work (list of assert methods can be especially useful).

Simple learning assignments:

  1. (tick) Provide testing coverage for CRM_Activity_BAO_ActivityAssignment
    1. removeAssignment - add the test named testRemoveAssignment in CRM/Activity/BAO/ActivityAssignmentTest.php
    2. retrieveAssigneeIdsByActivityId - add the test named testRetrieveAssigneeIdsByActivityId in CRM/Activity/BAO/ActivityAssignmentTest.php
    3. getAssigneeNames - add the test named testGetAssigneeNames in CRM/Activity/BAO/ActivityAssignmentTest.php
  2. Provide testing coverage for CRM_Activity_BAO_ActivityTarget
    1. removeTarget - add the test named testRemoveTarget in CRM/Activity/BAO/ActivityTargetTest.php
    2. retrieveTargetIdsByActivityId - add the test named testRetrieveTargetIdsByActivityId in CRM/Activity/BAO/ActivityTargetTest.php
    3. getTargetNames - add the test named testGetTargetNames in CRM/Activity/BAO/ActivityTargetTest.php
  3. Provide testing coverage for CRM_Contact_BAO_GroupContact
    1. add - add the test named testAdd in CRM/Contact/BAO/GroupContactTest.php
    2. getGroupId - add the test named testGetGroupId in CRM/Contact/BAO/GroupContactTest.php
  4. Provide testing coverage for CRM_Contribute_BAO_Premium
    1. retrieve - add the test named testRetrieve in CRM/Contribute/BAO/PremiumTest.php
    2. del - add the test named testDel in CRM/Contribute/BAO/PremiumTest.php
  5. (tick) Provide testing coverage for selected methods in CRM_Pledge_BAO_Payment
    1. add - add the test named testAdd in CRM/Pledge/BAO/PaymentTestTest.php
    2. retrieve - add the test named testRetrieve in CRM/Pledge/BAO/PaymentTestTest.php
    3. deletePayments - add the test named testAdd in CRM/Pledge/BAO/PaymentTestTest.php
  6. (slightly more advanced) Provide full testing coverage for CRM_Contribute_BAO_ContributionRecur
  7. (tick) PRovide testing coverage for selected method in CRM_Contribute_BAO_PCP
    1. add - add two tests named testAddWithPCPBlockTrue and testAddWithPCPBlockFalse - take a look at the condition statement in the code to understand why - you'll need to check for both scenarios!

Advanced assignments:

Expert assignments:

Labels
  • None

Creative Commons License
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-Share Alike 3.0 United States Licence.