Línea 117... |
Línea 117... |
117 |
*
|
117 |
*
|
118 |
* @param string $input The input SQL query
|
118 |
* @param string $input The input SQL query
|
119 |
* @param string $expected The expected resultant query
|
119 |
* @param string $expected The expected resultant query
|
120 |
* @dataProvider add_no_lock_to_temp_tables_provider
|
120 |
* @dataProvider add_no_lock_to_temp_tables_provider
|
121 |
*/
|
121 |
*/
|
122 |
public function test_add_no_lock_to_temp_tables($input, $expected) {
|
122 |
public function test_add_no_lock_to_temp_tables($input, $expected): void {
|
123 |
$sqlsrv = new sqlsrv_native_moodle_database();
|
123 |
$sqlsrv = new sqlsrv_native_moodle_database();
|
Línea 124... |
Línea 124... |
124 |
|
124 |
|
Línea 125... |
Línea 125... |
125 |
$reflector = new \ReflectionObject($sqlsrv);
|
125 |
$reflector = new \ReflectionObject($sqlsrv);
|
Línea 242... |
Línea 242... |
242 |
* @dataProvider has_query_order_by_provider
|
242 |
* @dataProvider has_query_order_by_provider
|
243 |
* @param string $sql the query
|
243 |
* @param string $sql the query
|
244 |
* @param string $expectedmainquery the expected main query
|
244 |
* @param string $expectedmainquery the expected main query
|
245 |
* @param bool $expectedresult the expected result
|
245 |
* @param bool $expectedresult the expected result
|
246 |
*/
|
246 |
*/
|
247 |
public function test_has_query_order_by(string $sql, string $expectedmainquery, bool $expectedresult) {
|
247 |
public function test_has_query_order_by(string $sql, string $expectedmainquery, bool $expectedresult): void {
|
248 |
$mainquery = preg_replace('/\(((?>[^()]+)|(?R))*\)/', '()', $sql);
|
248 |
$mainquery = preg_replace('/\(((?>[^()]+)|(?R))*\)/', '()', $sql);
|
249 |
$this->assertSame($expectedmainquery, $mainquery);
|
249 |
$this->assertSame($expectedmainquery, $mainquery);
|
Línea 250... |
Línea 250... |
250 |
|
250 |
|
251 |
// The has_query_order_by static method is protected. Use Reflection to call the method.
|
251 |
// The has_query_order_by static method is protected. Use Reflection to call the method.
|