test: coverage recording now needs to be explicit
[mediawiki.git] / tests / phpunit / includes / api / format / ApiFormatTestBase.php
blob153f2cf46d21e510a6739bb155f7fa649a4d1dd9
1 <?php
3 abstract class ApiFormatTestBase extends ApiTestCase {
4 protected function apiRequest( $format, $params, $data = null ) {
5 $data = parent::doApiRequest( $params, $data, true );
7 $module = $data[3];
9 $printer = $module->createPrinterByName( $format );
10 $printer->setUnescapeAmps( false );
12 $printer->initPrinter( false );
14 ob_start();
15 $printer->execute();
16 $out = ob_get_clean();
18 $printer->closePrinter();
20 return $out;