3 require_once __DIR__ .
"/../../../maintenance/getSlaveServer.php";
22 if ( $this->db->getType() ===
'sqlite' ) {
27 $octet =
'([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])';
28 $ip =
"(($octet\.){3}$octet)";
30 $label =
'([a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)';
31 $hostname =
"($label(\.$label)*)";
33 return "($ip|$hostname)(:[0-9]{1,5})?";
40 $this->expectOutputRegex(
"/^" . self::getServerRE() .
"\n$/D" );
47 $argv =
array(
null,
"--globals" );
50 $gss->loadParamsAndArgs();
55 $output = $this->getActualOutput();
56 $firstLineEndPos = strpos(
$output,
"\n" );
57 if ( $firstLineEndPos ===
false ) {
58 $this->
fail(
"Could not find end of first line of output" );
60 $firstLine = substr(
$output, 0, $firstLineEndPos );
61 $this->assertRegExp(
"/^" . self::getServerRE() .
"$/D",
62 $firstLine,
"DB Server" );
65 $this->expectOutputRegex(
"/^[[:space:]]*\[wgDBprefix\][[:space:]]*=> "
66 . $wgDBprefix .
"$/m" );