Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 41... Línea 41...
41
    /**
41
    /**
42
     * Ensure that valid SQL results in the relevant users being added.
42
     * Ensure that valid SQL results in the relevant users being added.
43
     *
43
     *
44
     * @covers ::add_from_sql
44
     * @covers ::add_from_sql
45
     */
45
     */
46
    public function test_add_from_sql() {
46
    public function test_add_from_sql(): void {
47
        global $DB;
47
        global $DB;
Línea 48... Línea 48...
48
 
48
 
49
        $sql = "SELECT c.id FROM {user} c";
49
        $sql = "SELECT c.id FROM {user} c";
50
        $params = [];
50
        $params = [];
Línea 59... Línea 59...
59
    /**
59
    /**
60
     * Ensure that adding a single user adds that user.
60
     * Ensure that adding a single user adds that user.
61
     *
61
     *
62
     * @covers ::add_user
62
     * @covers ::add_user
63
     */
63
     */
64
    public function test_add_user() {
64
    public function test_add_user(): void {
65
        $this->resetAfterTest();
65
        $this->resetAfterTest();
Línea 66... Línea 66...
66
 
66
 
67
        $u1 = $this->getDataGenerator()->create_user();
67
        $u1 = $this->getDataGenerator()->create_user();
Línea 78... Línea 78...
78
    /**
78
    /**
79
     * Ensure that adding multiple users by ID adds those users.
79
     * Ensure that adding multiple users by ID adds those users.
80
     *
80
     *
81
     * @covers ::add_users
81
     * @covers ::add_users
82
     */
82
     */
83
    public function test_add_users() {
83
    public function test_add_users(): void {
84
        $this->resetAfterTest();
84
        $this->resetAfterTest();
Línea 85... Línea 85...
85
 
85
 
86
        $u1 = $this->getDataGenerator()->create_user();
86
        $u1 = $this->getDataGenerator()->create_user();
87
        $u2 = $this->getDataGenerator()->create_user();
87
        $u2 = $this->getDataGenerator()->create_user();