Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

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

Defines 1 class


Class: deployment_repository_test  - X-Ref

Tests for deployment_repository.

create_test_deployment(string $deploymentid = 'DeployID123',int $appregistrationid = null)   X-Ref
Helper to create test deployment objects for use with the repository tests.

return: deployment the deployment.
param: string $deploymentid the string id of the deployment.
param: int|null $appregistrationid the id of the application registration to which this deployment belongs.

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

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

assert_deployment_db_values(deployment $expected)   X-Ref
Helper to assert that all the key elements of a deployment are present in the DB.

param: deployment $expected the deployment whose values are deemed correct.

test_save_new()   X-Ref
Test saving a new deployment.


test_save_existing()   X-Ref
Test saving an existing deployment.


test_save_unique_constraints_not_met()   X-Ref
Test trying to save two deployments of identical nature in sequence.


test_exists()   X-Ref
Test existence of a deployment within the repository.


test_find()   X-Ref
Test finding a deployment in the repository.


test_delete()   X-Ref
Test deleting a deployment object from the repository.


test_delete_by_registration()   X-Ref
Test deleting a deployment by registration.


test_count_by_registration()   X-Ref
Test counting the number of deployments for a given registration.


test_find_by_registration()   X-Ref
Test confirming a deployment can be found by registration and deploymentid.


test_find_all_by_registration()   X-Ref
Testing that all deployments for a given registration can be fetched.