Merge "rdbms: cleanup some type checks and documentation"
[lhc/web/wiklou.git] / tests / phpunit / includes / db / LBFactoryTest.php
index 356ebe5..2892283 100644 (file)
@@ -194,12 +194,12 @@ class LBFactoryTest extends MediaWikiTestCase {
         * @covers \Wikimedia\Rdbms\ChronologyProtector
         */
        public function testChronologyProtector() {
-               // (a) First HTTP request
-               $m1Pos = new MySQLMasterPos( 'db1034-bin.000976', '843431247' );
-               $m2Pos = new MySQLMasterPos( 'db1064-bin.002400', '794074907' );
-
                $now = microtime( true );
 
+               // (a) First HTTP request
+               $m1Pos = new MySQLMasterPos( 'db1034-bin.000976/843431247', $now );
+               $m2Pos = new MySQLMasterPos( 'db1064-bin.002400/794074907', $now );
+
                // Master DB 1
                $mockDB1 = $this->getMockBuilder( DatabaseMysqli::class )
                        ->disableOriginalConstructor()
@@ -506,9 +506,9 @@ class LBFactoryTest extends MediaWikiTestCase {
                        $this->assertInstanceOf( \Wikimedia\Rdbms\DBConnectionError::class, $e );
                        $this->assertFalse( $db->isOpen() );
                } else {
-                       \MediaWiki\suppressWarnings();
+                       \Wikimedia\suppressWarnings();
                        $this->assertFalse( $db->selectDB( 'garbage-db' ) );
-                       \MediaWiki\restoreWarnings();
+                       \Wikimedia\restoreWarnings();
                }
 
                $lb->reuseConnection( $db ); // don't care