Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Class: provider_test  - X-Ref

Privacy provider test for enrol_paypal.

setUp()   X-Ref
No description

test_get_metadata()   X-Ref
Test for provider::get_metadata().


test_get_contexts_for_userid()   X-Ref
Test for provider::get_contexts_for_userid().


test_get_contexts_for_userid_receiver()   X-Ref
Test for provider::get_contexts_for_userid with a user who is a receiver.


test_get_contexts_for_userid_business()   X-Ref
Test for provider::get_contexts_for_userid with a user who is a business.


test_export_user_data()   X-Ref
Test for provider::export_user_data().


test_export_user_data_not_enrolled()   X-Ref
Test for provider::export_user_data() when user is not enrolled.


test_export_user_data_no_enrolment()   X-Ref
Test for provider::export_user_data() when user has no enrolment.


test_export_user_data_multiple_paypal_history()   X-Ref
No description

test_delete_data_for_all_users_in_context()   X-Ref
Test for provider::delete_data_for_all_users_in_context().


test_delete_data_for_all_users_in_context_multiple_transactions()   X-Ref
Test for provider::delete_data_for_all_users_in_context() when there is multiple transaction histories for a user.


test_delete_data_for_user_from_single_context()   X-Ref
Test for provider::delete_data_for_user() when student is enrolled in multiple courses and deleting from one of them.


test_delete_data_for_user_from_multiple_context()   X-Ref
Test for provider::delete_data_for_user() when student is enrolled in multiple courses and deleting from all of them.


test_delete_data_for_user_for_business_user()   X-Ref
Test for provider::delete_data_for_user() when user is not enrolled, but is the receiver of the payment.


test_delete_data_for_user_for_receiver_user()   X-Ref
Test for provider::delete_data_for_user() when user is not enrolled, but is the receiver of the payment.


create_enrol_paypal_record($business, $receiver, $course, $user, $enrol, $txnid, $time)   X-Ref
Helper function to create an enrol_paypal record.

param: \stdClass   $business The user associated with the business
param: \stdClass   $receiver The user associated with the receiver
param: \stdClass   $course The course to associate with
param: \stdClass   $user The user associated with the student
param: \stdClass   $enrol The enrolment instance
param: String      $txnid The Paypal txnid to use
param: int         $time The txn time

test_get_users_in_context()   X-Ref
Test for provider::get_users_in_context().


test_delete_data_for_users()   X-Ref
Test for provider::delete_data_for_users().


test_delete_data_for_users_business()   X-Ref
Test for provider::delete_data_for_users() for business user deletion.


test_delete_data_for_users_receiver()   X-Ref
Test for provider::delete_data_for_users() for receiver user deletion.