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  2015 Andrew Nicols <andrew@nicols.co.uk>
24
 * @copyright  2015 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 util_test extends \advanced_testcase {
27
final class util_test extends \advanced_testcase {
28
    /**
28
    /**
29
     * @dataProvider set_table_modified_by_sql_provider
29
     * @dataProvider set_table_modified_by_sql_provider
30
     */
30
     */
31
    public function test_set_table_modified_by_sql($sql, $expectations): void {
31
    public function test_set_table_modified_by_sql($sql, $expectations): void {
32
        \phpunit_util::reset_updated_table_list();
32
        \phpunit_util::reset_updated_table_list();
Línea 34... Línea 34...
34
        foreach ($expectations as $table => $present) {
34
        foreach ($expectations as $table => $present) {
35
            $this->assertEquals($present, !empty(\phpunit_util::$tableupdated[$table]));
35
            $this->assertEquals($present, !empty(\phpunit_util::$tableupdated[$table]));
36
        }
36
        }
37
    }
37
    }
Línea 38... Línea 38...
38
 
38
 
39
    public function set_table_modified_by_sql_provider() {
39
    public static function set_table_modified_by_sql_provider(): array {
40
        global $DB;
40
        global $DB;
Línea 41... Línea 41...
41
        $prefix = $DB->get_prefix();
41
        $prefix = $DB->get_prefix();
42
 
42