Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 22... Línea 22...
22
 * @package   core
22
 * @package   core
23
 * @category  test
23
 * @category  test
24
 * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
24
 * @copyright 2018 Andrew Nicols <andrew@nicols.co.uk>
25
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26
 */
26
 */
27
class database_logger_test extends \advanced_testcase {
27
final class database_logger_test extends \advanced_testcase {
Línea 28... Línea 28...
28
 
28
 
29
    /**
29
    /**
30
     * @var \moodle_database The original database prior to mocking
30
     * @var \moodle_database The original database prior to mocking
31
     */
31
     */
Línea 34... Línea 34...
34
    /**
34
    /**
35
     * Setup to backup the database before mocking.
35
     * Setup to backup the database before mocking.
36
     */
36
     */
37
    public function setUp(): void {
37
    public function setUp(): void {
38
        global $DB;
38
        global $DB;
-
 
39
        parent::setUp();
Línea 39... Línea 40...
39
 
40
 
40
        $this->DB = $DB;
41
        $this->DB = $DB;
Línea 41... Línea 42...
41
    }
42
    }
Línea 46... Línea 47...
46
    public function tearDown(): void {
47
    public function tearDown(): void {
47
        global $DB;
48
        global $DB;
Línea 48... Línea 49...
48
 
49
 
49
        $DB = $this->DB;
50
        $DB = $this->DB;
-
 
51
        $this->DB = null;
50
        $this->DB = null;
52
        parent::tearDown();
Línea 51... Línea 53...
51
    }
53
    }
52
 
54
 
53
    /**
55
    /**
Línea 234... Línea 236...
234
    /**
236
    /**
235
     * Data provider for delete_task_logs tests.
237
     * Data provider for delete_task_logs tests.
236
     *
238
     *
237
     * @return  array
239
     * @return  array
238
     */
240
     */
239
    public function delete_task_logs_provider(): array {
241
    public static function delete_task_logs_provider(): array {
240
        return [
242
        return [
241
            [
243
            [
242
                [0],
244
                [0],
243
                [1],
245
                [1],
244
                [1, 2, 3, 4, 5],
246
                [1, 2, 3, 4, 5],