Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 23... Línea 23...
23
 * @package    auth_db
23
 * @package    auth_db
24
 * @category   phpunit
24
 * @category   phpunit
25
 * @copyright  2012 Petr Skoda {@link http://skodak.org}
25
 * @copyright  2012 Petr Skoda {@link http://skodak.org}
26
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27
 */
27
 */
28
class db_test extends \advanced_testcase {
28
final class db_test extends \advanced_testcase {
29
    /** @var string Original error log */
29
    /** @var string Original error log */
30
    protected $oldlog;
30
    protected $oldlog;
Línea 31... Línea 31...
31
 
31
 
32
    /** @var int The amount of users to create for the large user set deletion test  */
32
    /** @var int The amount of users to create for the large user set deletion test  */
Línea 39... Línea 39...
39
        if ($DB->get_dbfamily() === 'mssql') {
39
        if ($DB->get_dbfamily() === 'mssql') {
40
            sqlsrv_configure("WarningsReturnAsErrors", false);
40
            sqlsrv_configure("WarningsReturnAsErrors", false);
41
            sqlsrv_configure("LogSubsystems", SQLSRV_LOG_SYSTEM_OFF);
41
            sqlsrv_configure("LogSubsystems", SQLSRV_LOG_SYSTEM_OFF);
42
            sqlsrv_configure("LogSeverity", SQLSRV_LOG_SEVERITY_ERROR);
42
            sqlsrv_configure("LogSeverity", SQLSRV_LOG_SEVERITY_ERROR);
43
        }
43
        }
-
 
44
        parent::tearDownAfterClass();
44
    }
45
    }
Línea 45... Línea 46...
45
 
46
 
46
    protected function init_auth_database() {
47
    protected function init_auth_database() {
47
        global $DB, $CFG;
48
        global $DB, $CFG;
Línea 77... Línea 78...
77
                    }
78
                    }
78
                    set_config('type', 'mysqli://'.rawurlencode($CFG->dbuser).':'.rawurlencode($CFG->dbpass).'@'.rawurlencode($CFG->dbhost).'/'.rawurlencode($CFG->dbname).'?socket='.rawurlencode($dbsocket), 'auth_db');
79
                    set_config('type', 'mysqli://'.rawurlencode($CFG->dbuser).':'.rawurlencode($CFG->dbpass).'@'.rawurlencode($CFG->dbhost).'/'.rawurlencode($CFG->dbname).'?socket='.rawurlencode($dbsocket), 'auth_db');
79
                }
80
                }
80
                break;
81
                break;
Línea 81... Línea -...
81
 
-
 
82
            case 'oracle':
-
 
83
                set_config('type', 'oci8po', 'auth_db');
-
 
84
                set_config('sybasequoting', '1', 'auth_db');
-
 
85
                break;
-
 
86
 
82
 
87
            case 'postgres':
83
            case 'postgres':
88
                set_config('type', 'postgres7', 'auth_db');
84
                set_config('type', 'postgres7', 'auth_db');
89
                $setupsql = "SET NAMES 'UTF-8'";
85
                $setupsql = "SET NAMES 'UTF-8'";
90
                if (!empty($CFG->dboptions['dbschema'])) {
86
                if (!empty($CFG->dboptions['dbschema'])) {