Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 38... Línea 38...
38
 * @package    core
38
 * @package    core
39
 * @category   test
39
 * @category   test
40
 * @copyright  2017 John Okely
40
 * @copyright  2017 John Okely
41
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
41
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
42
 */
42
 */
43
class sqlsrv_native_moodle_database_test extends \advanced_testcase {
43
final class sqlsrv_native_moodle_database_test extends \advanced_testcase {
44
 
-
 
45
    public function setUp(): void {
44
    public function setUp(): void {
46
        parent::setUp();
45
        parent::setUp();
47
        $this->resetAfterTest();
46
        $this->resetAfterTest();
48
    }
47
    }
Línea 49... Línea 48...
49
 
48
 
50
    /**
49
    /**
51
     * Dataprovider for test_add_no_lock_to_temp_tables
50
     * Dataprovider for test_add_no_lock_to_temp_tables
52
     * @return array Data for test_add_no_lock_to_temp_tables
51
     * @return array Data for test_add_no_lock_to_temp_tables
53
     */
52
     */
54
    public function add_no_lock_to_temp_tables_provider() {
53
    public static function add_no_lock_to_temp_tables_provider(): array {
55
        return [
54
        return [
56
            "Basic temp table, nothing following" => [
55
            "Basic temp table, nothing following" => [
57
                'input' => 'SELECT * FROM {table_temp}',
56
                'input' => 'SELECT * FROM {table_temp}',
58
                'expected' => 'SELECT * FROM {table_temp} WITH (NOLOCK)'
57
                'expected' => 'SELECT * FROM {table_temp} WITH (NOLOCK)'
Línea 140... Línea 139...
140
    /**
139
    /**
141
     * Data provider for test_has_query_order_by
140
     * Data provider for test_has_query_order_by
142
     *
141
     *
143
     * @return array data for test_has_query_order_by
142
     * @return array data for test_has_query_order_by
144
     */
143
     */
145
    public function has_query_order_by_provider() {
144
    public static function has_query_order_by_provider(): array {
146
        // Fixtures taken from https://docs.moodle.org/en/ad-hoc_contributed_reports.
145
        // Fixtures taken from https://docs.moodle.org/en/ad-hoc_contributed_reports.
Línea 147... Línea 146...
147
 
146
 
148
        return [
147
        return [
149
            'User with language => FALSE' => [
148
            'User with language => FALSE' => [