X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fjobqueue%2FJobQueueTest.php;h=0421fe7c68d2085761823ba3caec46fe75b80dda;hb=51945dbca3594;hp=bd21dc8a3eb832a63d8c42e76b6bdf4a149eb294;hpb=58858df842f91d9ea1c9f9b6f3c767d8b204886b;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/jobqueue/JobQueueTest.php b/tests/phpunit/includes/jobqueue/JobQueueTest.php index bd21dc8a3e..0421fe7c68 100644 --- a/tests/phpunit/includes/jobqueue/JobQueueTest.php +++ b/tests/phpunit/includes/jobqueue/JobQueueTest.php @@ -28,7 +28,7 @@ class JobQueueTest extends MediaWikiTestCase { } $baseConfig = $wgJobTypeConf[$name]; } else { - $baseConfig = [ 'class' => 'JobQueueDBSingle' ]; + $baseConfig = [ 'class' => JobQueueDBSingle::class ]; } $baseConfig['type'] = 'null'; $baseConfig['wiki'] = wfWikiID(); @@ -75,6 +75,7 @@ class JobQueueTest extends MediaWikiTestCase { $this->markTestSkipped( $desc ); } $this->assertEquals( wfWikiID(), $queue->getWiki(), "Proper wiki ID ($desc)" ); + $this->assertEquals( wfWikiID(), $queue->getDomain(), "Proper wiki ID ($desc)" ); } /** @@ -234,7 +235,7 @@ class JobQueueTest extends MediaWikiTestCase { $j = $queue->pop(); // Make sure ack() of the twin did not delete the sibling data - $this->assertType( 'NullJob', $j ); + $this->assertType( NullJob::class, $j ); } /** @@ -387,7 +388,7 @@ class JobQueueTest extends MediaWikiTestCase { class JobQueueDBSingle extends JobQueueDB { protected function getDB( $index ) { $lb = MediaWikiServices::getInstance()->getDBLoadBalancer(); - // Override to not use CONN_TRX_AUTO so that we see the same temporary `job` table - return $lb->getConnection( $index, [], $this->wiki ); + // Override to not use CONN_TRX_AUTOCOMMIT so that we see the same temporary `job` table + return $lb->getConnection( $index, [], $this->domain ); } }