Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(no description)

File Size: 419 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: application_registration_repository_test  - X-Ref

Tests for the application_registration_repository.

generate_application_registration(string $issuer = null, string $uniqueid = null,string $clientid = null)   X-Ref
Helper to generate a new application_registration object.

param: string|null $issuer the issuer of the application, or null to use a default.
param: string|null $uniqueid unique id for the tool registration, or null to use a default.
param: string|null $clientid the clientid of the platform's tool registration, or null to use a default.
return: application_registration the application_registration instance.

assert_same_registration_values(application_registration $expected,application_registration $check)   X-Ref
Helper to assert that all the key elements of two registrations (i.e. excluding id) are equal.

param: application_registration $expected the registration whose values are deemed correct.
param: application_registration $check the registration to check.

assert_registration_db_values(application_registration $registration)   X-Ref
Helper to assert that all the key elements of an application_registration are present in the DB.

param: application_registration $registration

test_save_new(array $regdata)   X-Ref
Tests saving application_registration instances using the repository.

param: array $regdata the registration data

save_data_provider()   X-Ref
Provides registrations in different states for use in test_save_new.

return: array the array of test data.

test_save_existing()   X-Ref
Test saving an application_registration that is already present in the store.


test_save_duplicate_unique_constraints()   X-Ref
Tests trying to persist two as-yet-unpersisted objects having identical makeup.


test_find()   X-Ref
Test finding an application_registration in the repository.


test_find_by_uniqueid()   X-Ref
Test finding an application registration by its unique id.


test_find_by_platform_uniqueid()   X-Ref
Test finding an application registration by its platform and unique id combination.


test_find_all()   X-Ref
Test verifying that find_all() returns all registrations.


test_find_by_platform()   X-Ref
Test confirming that registrations can be found by their platform string.


test_exists()   X-Ref
Test checking existence of an application_registration within the repository.


test_delete()   X-Ref
Test confirming that delete removes items from the repository.


test_find_by_deployment()   X-Ref
Verify that application registrations can be found through their linked deployments.