Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 30... Línea 30...
30
 * @package    qbank_comment
30
 * @package    qbank_comment
31
 * @copyright  2021 Catalyst IT Australia Pty Ltd
31
 * @copyright  2021 Catalyst IT Australia Pty Ltd
32
 * @author     Safat Shahin <safatshahin@catalyst-au.net>
32
 * @author     Safat Shahin <safatshahin@catalyst-au.net>
33
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
33
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 */
34
 */
35
class provider_test extends \core_privacy\tests\provider_testcase {
35
final class provider_test extends \core_privacy\tests\provider_testcase {
Línea 36... Línea 36...
36
 
36
 
37
    /** @var stdClass A teacher who is only enrolled in course1. */
37
    /** @var stdClass A teacher who is only enrolled in course1. */
Línea 38... Línea 38...
38
    protected $teacher1;
38
    protected $teacher1;
Línea 52... Línea 52...
52
    /**
52
    /**
53
     * Set up function for tests in this class.
53
     * Set up function for tests in this class.
54
     */
54
     */
55
    protected function setUp(): void {
55
    protected function setUp(): void {
56
        global $DB;
56
        global $DB;
-
 
57
        parent::setUp();
Línea 57... Línea 58...
57
 
58
 
58
        $this->resetAfterTest();
59
        $this->resetAfterTest();
Línea 59... Línea 60...
59
        $this->setAdminUser();
60
        $this->setAdminUser();
Línea 139... Línea 140...
139
 
140
 
140
        $contextlist = provider::get_contexts_for_userid($this->teacher3->id);
141
        $contextlist = provider::get_contexts_for_userid($this->teacher3->id);
Línea 141... Línea 142...
141
        $this->assertCount(2, $contextlist);
142
        $this->assertCount(2, $contextlist);
142
 
143
 
143
        $contextids = $contextlist->get_contextids();
144
        $contextids = $contextlist->get_contextids();
Línea 144... Línea 145...
144
        $this->assertEqualsCanonicalizing([$coursecontext1->id, $coursecontext2->id], $contextids);
145
        $this->assertEqualsCanonicalizing([$coursecontext1->id, $coursecontext2->id], array_values($contextids));
145
    }
146
    }
146
 
147