X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=inline;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiContinuationManagerTest.php;h=788d120c6b7bda6e39734fcedddf07218bfb2164;hb=767042c3e68adb29513;hp=3ad16d132224c025c9f54ef066a72cab5d5c9d59;hpb=ea42d90053b36cef47f318a1d50c18dfafc6b7b8;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiContinuationManagerTest.php b/tests/phpunit/includes/api/ApiContinuationManagerTest.php index 3ad16d1322..788d120c6b 100644 --- a/tests/phpunit/includes/api/ApiContinuationManagerTest.php +++ b/tests/phpunit/includes/api/ApiContinuationManagerTest.php @@ -22,7 +22,7 @@ class ApiContinuationManagerTest extends MediaWikiTestCase { $generator = new MockApiQueryBase( 'generator' ); $manager = self::getManager( '', $allModules, [ 'mock1', 'mock2' ] ); - $this->assertSame( 'ApiMain', $manager->getSource() ); + $this->assertSame( ApiMain::class, $manager->getSource() ); $this->assertSame( false, $manager->isGeneratorDone() ); $this->assertSame( $allModules, $manager->getRunModules() ); $manager->addContinueParam( $allModules[0], 'm1continue', [ 1, 2 ] ); @@ -160,10 +160,8 @@ class ApiContinuationManagerTest extends MediaWikiTestCase { try { self::getManager( 'foo', $allModules, [ 'mock1', 'mock2' ] ); $this->fail( 'Expected exception not thrown' ); - } catch ( UsageException $ex ) { - $this->assertSame( - 'Invalid continue param. You should pass the original value returned by the previous query', - $ex->getMessage(), + } catch ( ApiUsageException $ex ) { + $this->assertTrue( ApiTestCase::apiExceptionHasCode( $ex, 'badcontinue' ), 'Expected exception' ); }