Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 35... Línea 35...
35
 * Unit tests for the block_html implementation of the privacy API.
35
 * Unit tests for the block_html implementation of the privacy API.
36
 *
36
 *
37
 * @copyright  2018 Andrew Nicols <andrew@nicols.co.uk>
37
 * @copyright  2018 Andrew Nicols <andrew@nicols.co.uk>
38
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
38
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39
 */
39
 */
40
class provider_test extends \core_privacy\tests\provider_testcase {
40
final class provider_test extends \core_privacy\tests\provider_testcase {
41
    /**
41
    /**
42
     * Get the list of standard format options for comparison.
42
     * Get the list of standard format options for comparison.
43
     *
43
     *
44
     * @return \stdClass
44
     * @return \stdClass
45
     */
45
     */
Línea 295... Línea 295...
295
 
295
 
296
        // Test setup.
296
        // Test setup.
297
        $user = $this->getDataGenerator()->create_user();
297
        $user = $this->getDataGenerator()->create_user();
298
        $course = $this->getDataGenerator()->create_course();
298
        $course = $this->getDataGenerator()->create_course();
-
 
299
        $this->setUser($user);
Línea 299... Línea 300...
299
        $this->setUser($user);
300
        $this->getDataGenerator()->enrol_user($user->id, $course->id, 'editingteacher');
300
 
301
 
Línea 301... Línea 302...
301
        $block = $this->create_course_block($course, $title, $content, $format);
302
        $block = $this->create_course_block($course, $title, $content, $format);
Línea 322... Línea 323...
322
        $contexts = [];
323
        $contexts = [];
Línea 323... Línea 324...
323
 
324
 
324
        $user = $this->getDataGenerator()->create_user();
325
        $user = $this->getDataGenerator()->create_user();
325
        $course = $this->getDataGenerator()->create_course();
326
        $course = $this->getDataGenerator()->create_course();
-
 
327
        $this->setUser($user);
Línea 326... Línea 328...
326
        $this->setUser($user);
328
        $this->getDataGenerator()->enrol_user($user->id, $course->id, 'editingteacher');
327
 
329
 
Línea 328... Línea 330...
328
        $block = $this->create_course_block($course, $title, $content, $format);
330
        $block = $this->create_course_block($course, $title, $content, $format);
Línea 367... Línea 369...
367
        // Create a user with a course context HTML block.
369
        // Create a user with a course context HTML block.
368
        $user2 = $this->getDataGenerator()->create_user();
370
        $user2 = $this->getDataGenerator()->create_user();
369
        $this->setUser($user2);
371
        $this->setUser($user2);
Línea 370... Línea 372...
370
 
372
 
-
 
373
        $course = $this->getDataGenerator()->create_course();
371
        $course = $this->getDataGenerator()->create_course();
374
        $this->getDataGenerator()->enrol_user($user2->id, $course->id, 'editingteacher');
372
        $courseblock = $this->create_course_block($course, $title, $content, $blockformat);
375
        $courseblock = $this->create_course_block($course, $title, $content, $blockformat);
Línea 373... Línea 376...
373
        $coursecontext = \context_block::instance($courseblock->instance->id);
376
        $coursecontext = \context_block::instance($courseblock->instance->id);
374
 
377