From d417de70fcf39e0a7a15ba780b597914d16ca0f7 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 12 Mar 2014 18:12:23 +0100 Subject: Update to MediaWiki 1.22.4 --- tests/phpunit/maintenance/getSlaveServerTest.php | 67 ------------------------ 1 file changed, 67 deletions(-) delete mode 100644 tests/phpunit/maintenance/getSlaveServerTest.php (limited to 'tests/phpunit/maintenance/getSlaveServerTest.php') diff --git a/tests/phpunit/maintenance/getSlaveServerTest.php b/tests/phpunit/maintenance/getSlaveServerTest.php deleted file mode 100644 index 2c848862..00000000 --- a/tests/phpunit/maintenance/getSlaveServerTest.php +++ /dev/null @@ -1,67 +0,0 @@ -db->getType() === 'sqlite' ) { - // for SQLite, only the empty string is a good server name - return ''; - } - - $octet = '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])'; - $ip = "(($octet\.){3}$octet)"; - - $label = '([a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)'; - $hostname = "($label(\.$label)*)"; - - return "($ip|$hostname)(:[0-9]{1,5})?"; - } - - function testPlain() { - $gss = new GetSlaveServer(); - $gss->execute(); - - $this->expectOutputRegex( "/^" . self::getServerRE() . "\n$/D" ); - } - - function testXmlDumpsBackupUseCase() { - global $wgDBprefix; - - global $argv; - $argv = array( null, "--globals" ); - - $gss = new GetSlaveServer(); - $gss->loadParamsAndArgs(); - $gss->execute(); - $gss->globals(); - - // The main answer - $output = $this->getActualOutput(); - $firstLineEndPos = strpos( $output, "\n" ); - if ( $firstLineEndPos === false ) { - $this->fail( "Could not find end of first line of output" ); - } - $firstLine = substr( $output, 0, $firstLineEndPos ); - $this->assertRegExp( "/^" . self::getServerRE() . "$/D", - $firstLine, "DB Server" ); - - // xmldumps-backup relies on the wgDBprefix in the output. - $this->expectOutputRegex( "/^[[:space:]]*\[wgDBprefix\][[:space:]]*=> " - . $wgDBprefix . "$/m" ); - } -} -- cgit v1.2.2 From 9441dde8bfb95277df073717ed7817dced40f948 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 28 Mar 2014 05:41:12 +0100 Subject: Update to MediaWiki 1.22.5 --- tests/phpunit/maintenance/getSlaveServerTest.php | 67 ++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 tests/phpunit/maintenance/getSlaveServerTest.php (limited to 'tests/phpunit/maintenance/getSlaveServerTest.php') diff --git a/tests/phpunit/maintenance/getSlaveServerTest.php b/tests/phpunit/maintenance/getSlaveServerTest.php new file mode 100644 index 00000000..2c848862 --- /dev/null +++ b/tests/phpunit/maintenance/getSlaveServerTest.php @@ -0,0 +1,67 @@ +db->getType() === 'sqlite' ) { + // for SQLite, only the empty string is a good server name + return ''; + } + + $octet = '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])'; + $ip = "(($octet\.){3}$octet)"; + + $label = '([a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)'; + $hostname = "($label(\.$label)*)"; + + return "($ip|$hostname)(:[0-9]{1,5})?"; + } + + function testPlain() { + $gss = new GetSlaveServer(); + $gss->execute(); + + $this->expectOutputRegex( "/^" . self::getServerRE() . "\n$/D" ); + } + + function testXmlDumpsBackupUseCase() { + global $wgDBprefix; + + global $argv; + $argv = array( null, "--globals" ); + + $gss = new GetSlaveServer(); + $gss->loadParamsAndArgs(); + $gss->execute(); + $gss->globals(); + + // The main answer + $output = $this->getActualOutput(); + $firstLineEndPos = strpos( $output, "\n" ); + if ( $firstLineEndPos === false ) { + $this->fail( "Could not find end of first line of output" ); + } + $firstLine = substr( $output, 0, $firstLineEndPos ); + $this->assertRegExp( "/^" . self::getServerRE() . "$/D", + $firstLine, "DB Server" ); + + // xmldumps-backup relies on the wgDBprefix in the output. + $this->expectOutputRegex( "/^[[:space:]]*\[wgDBprefix\][[:space:]]*=> " + . $wgDBprefix . "$/m" ); + } +} -- cgit v1.2.2 From 2e44b49a2db3026050b136de9b00f749dd3ff939 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 25 Apr 2014 06:26:49 +0200 Subject: Update to MediaWiki 1.22.6 --- tests/phpunit/maintenance/getSlaveServerTest.php | 67 ------------------------ 1 file changed, 67 deletions(-) delete mode 100644 tests/phpunit/maintenance/getSlaveServerTest.php (limited to 'tests/phpunit/maintenance/getSlaveServerTest.php') diff --git a/tests/phpunit/maintenance/getSlaveServerTest.php b/tests/phpunit/maintenance/getSlaveServerTest.php deleted file mode 100644 index 2c848862..00000000 --- a/tests/phpunit/maintenance/getSlaveServerTest.php +++ /dev/null @@ -1,67 +0,0 @@ -db->getType() === 'sqlite' ) { - // for SQLite, only the empty string is a good server name - return ''; - } - - $octet = '([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])'; - $ip = "(($octet\.){3}$octet)"; - - $label = '([a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)'; - $hostname = "($label(\.$label)*)"; - - return "($ip|$hostname)(:[0-9]{1,5})?"; - } - - function testPlain() { - $gss = new GetSlaveServer(); - $gss->execute(); - - $this->expectOutputRegex( "/^" . self::getServerRE() . "\n$/D" ); - } - - function testXmlDumpsBackupUseCase() { - global $wgDBprefix; - - global $argv; - $argv = array( null, "--globals" ); - - $gss = new GetSlaveServer(); - $gss->loadParamsAndArgs(); - $gss->execute(); - $gss->globals(); - - // The main answer - $output = $this->getActualOutput(); - $firstLineEndPos = strpos( $output, "\n" ); - if ( $firstLineEndPos === false ) { - $this->fail( "Could not find end of first line of output" ); - } - $firstLine = substr( $output, 0, $firstLineEndPos ); - $this->assertRegExp( "/^" . self::getServerRE() . "$/D", - $firstLine, "DB Server" ); - - // xmldumps-backup relies on the wgDBprefix in the output. - $this->expectOutputRegex( "/^[[:space:]]*\[wgDBprefix\][[:space:]]*=> " - . $wgDBprefix . "$/m" ); - } -} -- cgit v1.2.2