Proyectos de Subversion Moodle

Rev

Rev 11 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 11 Rev 1441
Línea 22... Línea 22...
22
 * @package enrol_lti
22
 * @package enrol_lti
23
 * @copyright 2021 Jake Dallimore <jrhdallimore@gmail.com>
23
 * @copyright 2021 Jake Dallimore <jrhdallimore@gmail.com>
24
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\application_registration
25
 * @coversDefaultClass \enrol_lti\local\ltiadvantage\entity\application_registration
26
 */
26
 */
27
class application_registration_test extends \advanced_testcase {
27
final class application_registration_test extends \advanced_testcase {
Línea 28... Línea 28...
28
 
28
 
29
    /**
29
    /**
30
     * Test the creation of an application_registration instance.
30
     * Test the creation of an application_registration instance.
31
     *
31
     *
Línea 57... Línea 57...
57
    /**
57
    /**
58
     * Data provider for testing the creation of application_registration instances.
58
     * Data provider for testing the creation of application_registration instances.
59
     *
59
     *
60
     * @return array the data for testing.
60
     * @return array the data for testing.
61
     */
61
     */
62
    public function creation_data_provider(): array {
62
    public static function creation_data_provider(): array {
63
        return [
63
        return [
64
            'Valid, only required args provided' => [
64
            'Valid, only required args provided' => [
65
                'args' => [
65
                'args' => [
66
                    'name' => 'Platform X',
66
                    'name' => 'Platform X',
67
                    'uniqueid' => 'a2c94a2c94',
67
                    'uniqueid' => 'a2c94a2c94',
Línea 201... Línea 201...
201
    /**
201
    /**
202
     * Data provider for testing draft creation.
202
     * Data provider for testing draft creation.
203
     *
203
     *
204
     * @return array the test case data.
204
     * @return array the test case data.
205
     */
205
     */
206
    public function create_draft_data_provider(): array {
206
    public static function create_draft_data_provider(): array {
207
        return [
207
        return [
208
            'Valid, new draft' => [
208
            'Valid, new draft' => [
209
                'args' => [
209
                'args' => [
210
                    'name' => 'Platform X',
210
                    'name' => 'Platform X',
211
                    'uniqueid' => 'a2c94a2c94',
211
                    'uniqueid' => 'a2c94a2c94',
Línea 266... Línea 266...
266
    /**
266
    /**
267
     * Data provider for testing the add_tool_deployment method.
267
     * Data provider for testing the add_tool_deployment method.
268
     *
268
     *
269
     * @return array the array of test data.
269
     * @return array the array of test data.
270
     */
270
     */
271
    public function add_tool_deployment_data_provider(): array {
271
    public static function add_tool_deployment_data_provider(): array {
272
        return [
272
        return [
273
            'Valid, contains id on registration and valid deployment data provided' => [
273
            'Valid, contains id on registration and valid deployment data provided' => [
274
                'args' => [
274
                'args' => [
275
                    'registration' => [
275
                    'registration' => [
276
                        'name' => 'Platform X',
276
                        'name' => 'Platform X',