Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 105... Línea 105...
105
     * @dataProvider create_provider
105
     * @dataProvider create_provider
106
     * @param bool $useagent if use agent as actor (or group if false)
106
     * @param bool $useagent if use agent as actor (or group if false)
107
     * @param array $extras extra item elements
107
     * @param array $extras extra item elements
108
     * @param array $extravalues extra string values
108
     * @param array $extravalues extra string values
109
     */
109
     */
110
    public function test_create(bool $useagent, array $extras, array $extravalues) {
110
    public function test_create(bool $useagent, array $extras, array $extravalues): void {
Línea 111... Línea 111...
111
 
111
 
Línea 112... Línea 112...
112
        $this->resetAfterTest();
112
        $this->resetAfterTest();
113
 
113
 
Línea 237... Línea 237...
237
     * @dataProvider create_provider
237
     * @dataProvider create_provider
238
     * @param bool $useagent if use agent as actor (or group if false)
238
     * @param bool $useagent if use agent as actor (or group if false)
239
     * @param array $extras extra item elements
239
     * @param array $extras extra item elements
240
     * @param array $extravalues extra string values
240
     * @param array $extravalues extra string values
241
     */
241
     */
242
    public function test_create_from_data(bool $useagent, array $extras, array $extravalues) {
242
    public function test_create_from_data(bool $useagent, array $extras, array $extravalues): void {
243
        $this->resetAfterTest();
243
        $this->resetAfterTest();
Línea 244... Línea 244...
244
 
244
 
245
        // Create one course with a group.
245
        // Create one course with a group.
246
        $course = $this->getDataGenerator()->create_course();
246
        $course = $this->getDataGenerator()->create_course();
Línea 315... Línea 315...
315
 
315
 
316
    /**
316
    /**
317
     * Test adding attachments to statement.
317
     * Test adding attachments to statement.
318
     *
318
     *
319
     */
319
     */
Línea 320... Línea 320...
320
    public function test_add_attachment() {
320
    public function test_add_attachment(): void {
321
 
321
 
Línea 322... Línea 322...
322
        // Our statement.
322
        // Our statement.
Línea 347... Línea 347...
347
 
347
 
348
    /**
348
    /**
349
     * Test adding attachments to statement.
349
     * Test adding attachments to statement.
350
     *
350
     *
351
     */
351
     */
Línea 352... Línea 352...
352
    public function test_add_attachment_from_data() {
352
    public function test_add_attachment_from_data(): void {
Línea 353... Línea 353...
353
 
353
 
354
        $this->resetAfterTest();
354
        $this->resetAfterTest();
Línea 397... Línea 397...
397
     *
397
     *
398
     * @dataProvider invalid_gets_provider
398
     * @dataProvider invalid_gets_provider
399
     * @param string $method the method to test
399
     * @param string $method the method to test
400
     * @param bool $exception if an exception is expected
400
     * @param bool $exception if an exception is expected
401
     */
401
     */
402
    public function test_invalid_gets(string $method, bool $exception) {
402
    public function test_invalid_gets(string $method, bool $exception): void {
403
        $statement = new statement();
403
        $statement = new statement();
404
        if ($exception) {
404
        if ($exception) {
405
            $this->expectException(xapi_exception::class);
405
            $this->expectException(xapi_exception::class);
406
        }
406
        }
407
        $result = $statement->$method();
407
        $result = $statement->$method();
Línea 434... Línea 434...
434
    }
434
    }
Línea 435... Línea 435...
435
 
435
 
436
    /**
436
    /**
437
     * Try to get a user from a group statement.
437
     * Try to get a user from a group statement.
438
     */
438
     */
Línea 439... Línea 439...
439
    public function test_invalid_get_user() {
439
    public function test_invalid_get_user(): void {
Línea 440... Línea 440...
440
 
440
 
441
        $this->resetAfterTest();
441
        $this->resetAfterTest();
Línea 460... Línea 460...
460
    }
460
    }
Línea 461... Línea 461...
461
 
461
 
462
    /**
462
    /**
463
     * Try to get a group from an agent statement.
463
     * Try to get a group from an agent statement.
464
     */
464
     */
465
    public function test_invalid_get_group() {
465
    public function test_invalid_get_group(): void {
Línea 466... Línea 466...
466
        $this->resetAfterTest();
466
        $this->resetAfterTest();
Línea 467... Línea 467...
467
 
467
 
Línea 480... Línea 480...
480
    }
480
    }
Línea 481... Línea 481...
481
 
481
 
482
    /**
482
    /**
483
     * Try to get activity Id from a statement with agent object.
483
     * Try to get activity Id from a statement with agent object.
484
     */
484
     */
485
    public function test_invalid_get_activity_id() {
485
    public function test_invalid_get_activity_id(): void {
Línea 486... Línea 486...
486
        $this->resetAfterTest();
486
        $this->resetAfterTest();
Línea 487... Línea 487...
487
 
487
 
Línea 545... Línea 545...
545
    }
545
    }
Línea 546... Línea 546...
546
 
546
 
547
    /**
547
    /**
548
     * Test minify statement.
548
     * Test minify statement.
549
     */
549
     */
Línea 550... Línea 550...
550
    public function test_minify() {
550
    public function test_minify(): void {
Línea 551... Línea 551...
551
 
551