X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fapi%2FApiParseTest.php;h=f8399a3f3336e4ba820e8d3d7c129b314ccfd166;hb=d1756504ef32f801c144a15d1115c20c33bd2a33;hp=7f2c1a6d5f6d6d78c26e99e58a476a679472b66d;hpb=7f6bd0c6fec48474f2225bd26979815c0229813d;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/api/ApiParseTest.php b/tests/phpunit/includes/api/ApiParseTest.php index 7f2c1a6d5f..f8399a3f33 100644 --- a/tests/phpunit/includes/api/ApiParseTest.php +++ b/tests/phpunit/includes/api/ApiParseTest.php @@ -97,8 +97,7 @@ class ApiParseTest extends ApiTestCase { $this->assertCount( 1, $res[0] ); } else { $this->assertCount( 2, $res[0] ); - // This deliberately fails if there are extra warnings - $this->assertSame( [ 'parse' => [ 'warnings' => $warnings ] ], $res[0]['warnings'] ); + $this->assertSame( [ 'warnings' => $warnings ], $res[0]['warnings']['parse'] ); } } @@ -651,7 +650,6 @@ class ApiParseTest extends ApiTestCase { function ( $parser ) { $output = $parser->getOutput(); $output->addModules( [ 'foo', 'bar' ] ); - $output->addModuleScripts( [ 'baz', 'quuz' ] ); $output->addModuleStyles( [ 'aaa', 'zzz' ] ); $output->addJsConfigVars( [ 'x' => 'y', 'z' => -3 ] ); } @@ -664,7 +662,7 @@ class ApiParseTest extends ApiTestCase { ] ); $this->assertSame( [ 'foo', 'bar' ], $res[0]['parse']['modules'] ); - $this->assertSame( [ 'baz', 'quuz' ], $res[0]['parse']['modulescripts'] ); + $this->assertSame( [], $res[0]['parse']['modulescripts'] ); $this->assertSame( [ 'aaa', 'zzz' ], $res[0]['parse']['modulestyles'] ); $this->assertSame( [ 'x' => 'y', 'z' => -3 ], $res[0]['parse']['jsconfigvars'] ); $this->assertSame( '{"x":"y","z":-3}', $res[0]['parse']['encodedjsconfigvars'] ); @@ -827,7 +825,8 @@ class ApiParseTest extends ApiTestCase { 'disabletidy' => '', ] ); - $this->assertParsedTo( "

Mixed up\n

", $res2 ); + $this->assertParsedTo( "

Mixed up\n

", $res2, + 'The parameter "disabletidy" has been deprecated.' ); } public function testFormatCategories() {