Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 99... Línea 99...
99
 
99
 
100
    /**
100
    /**
101
     * Tests that get_recordset_sql works when using cursors, which it does when no limit is
101
     * Tests that get_recordset_sql works when using cursors, which it does when no limit is
102
     * specified.
102
     * specified.
103
     */
103
     */
104
    public function test_recordset_cursors() {
104
    public function test_recordset_cursors(): void {
Línea 105... Línea 105...
105
        $this->init_db(3);
105
        $this->init_db(3);
106
 
106
 
107
        // Query the table and check the actual queries using debug mode, also check the count.
107
        // Query the table and check the actual queries using debug mode, also check the count.
Línea 161... Línea 161...
161
 
161
 
162
    /**
162
    /**
163
     * Tests that get_recordset_sql works when using cursors and when there are two overlapping
163
     * Tests that get_recordset_sql works when using cursors and when there are two overlapping
164
     * recordsets being used.
164
     * recordsets being used.
165
     */
165
     */
166
    public function test_recordset_cursors_overlapping() {
166
    public function test_recordset_cursors_overlapping(): void {
Línea 167... Línea 167...
167
        $this->init_db(3);
167
        $this->init_db(3);
168
 
168
 
Línea 219... Línea 219...
219
    }
219
    }
Línea 220... Línea 220...
220
 
220
 
221
    /**
221
    /**
222
     * Tests that get_recordset_sql works when using cursors and transactions inside.
222
     * Tests that get_recordset_sql works when using cursors and transactions inside.
223
     */
223
     */
224
    public function test_recordset_cursors_transaction_inside() {
224
    public function test_recordset_cursors_transaction_inside(): void {
Línea 225... Línea 225...
225
        $this->init_db(3);
225
        $this->init_db(3);
226
 
226
 
227
        // Transaction inside the recordset processing.
227
        // Transaction inside the recordset processing.
Línea 237... Línea 237...
237
    }
237
    }
Línea 238... Línea 238...
238
 
238
 
239
    /**
239
    /**
240
     * Tests that get_recordset_sql works when using cursors and a transaction outside.
240
     * Tests that get_recordset_sql works when using cursors and a transaction outside.
241
     */
241
     */
242
    public function test_recordset_cursors_transaction_outside() {
242
    public function test_recordset_cursors_transaction_outside(): void {
Línea 243... Línea 243...
243
        $this->init_db(3);
243
        $this->init_db(3);
244
 
244
 
245
        // Transaction outside the recordset processing.
245
        // Transaction outside the recordset processing.
Línea 255... Línea 255...
255
    }
255
    }
Línea 256... Línea 256...
256
 
256
 
257
    /**
257
    /**
258
     * Tests that get_recordset_sql works when using cursors and a transaction overlapping.
258
     * Tests that get_recordset_sql works when using cursors and a transaction overlapping.
259
     */
259
     */
260
    public function test_recordset_cursors_transaction_overlapping_before() {
260
    public function test_recordset_cursors_transaction_overlapping_before(): void {
Línea 261... Línea 261...
261
        $this->init_db(3);
261
        $this->init_db(3);
262
 
262
 
263
        // Transaction outside the recordset processing.
263
        // Transaction outside the recordset processing.
Línea 273... Línea 273...
273
    }
273
    }
Línea 274... Línea 274...
274
 
274
 
275
    /**
275
    /**
276
     * Tests that get_recordset_sql works when using cursors and a transaction overlapping.
276
     * Tests that get_recordset_sql works when using cursors and a transaction overlapping.
277
     */
277
     */
278
    public function test_recordset_cursors_transaction_overlapping_after() {
278
    public function test_recordset_cursors_transaction_overlapping_after(): void {
Línea 279... Línea 279...
279
        $this->init_db(3);
279
        $this->init_db(3);
280
 
280
 
281
        // Transaction outside the recordset processing.
281
        // Transaction outside the recordset processing.
Línea 292... Línea 292...
292
 
292
 
293
    /**
293
    /**
294
     * Tests that get_recordset_sql works when using cursors and a transaction that 'fails' and gets
294
     * Tests that get_recordset_sql works when using cursors and a transaction that 'fails' and gets
295
     * rolled back.
295
     * rolled back.
296
     */
296
     */
297
    public function test_recordset_cursors_transaction_rollback() {
297
    public function test_recordset_cursors_transaction_rollback(): void {
Línea 298... Línea 298...
298
        $this->init_db(3);
298
        $this->init_db(3);
299
 
299
 
300
        try {
300
        try {
Línea 330... Línea 330...
330
    }
330
    }
Línea 331... Línea 331...
331
 
331
 
332
    /**
332
    /**
333
     * Tests that get_recordset_sql works when not using cursors, because a limit is specified.
333
     * Tests that get_recordset_sql works when not using cursors, because a limit is specified.
334
     */
334
     */
335
    public function test_recordset_no_cursors_limit() {
335
    public function test_recordset_no_cursors_limit(): void {
Línea 336... Línea 336...
336
        $this->init_db(3);
336
        $this->init_db(3);
337
 
337
 
338
        $this->specialdb->set_debug(true);
338
        $this->specialdb->set_debug(true);
Línea 360... Línea 360...
360
 
360
 
361
    /**
361
    /**
362
     * Tests that get_recordset_sql works when not using cursors, because the config setting turns
362
     * Tests that get_recordset_sql works when not using cursors, because the config setting turns
363
     * them off.
363
     * them off.
364
     */
364
     */
365
    public function test_recordset_no_cursors_config() {
365
    public function test_recordset_no_cursors_config(): void {
Línea 366... Línea 366...
366
        $this->init_db(0);
366
        $this->init_db(0);
367
 
367
 
368
        $this->specialdb->set_debug(true);
368
        $this->specialdb->set_debug(true);