2024-05-14 14:50:24 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Extension\MultimediaViewer\Tests;
|
|
|
|
|
2024-06-12 18:38:07 +00:00
|
|
|
class BundleSizeTest extends \MediaWiki\Tests\Structure\BundleSizeTestBase {
|
2024-05-14 14:50:24 +00:00
|
|
|
|
|
|
|
/** @inheritDoc */
|
|
|
|
public function getBundleSizeConfig(): string {
|
|
|
|
return dirname( __DIR__, 3 ) . '/bundlesize.config.json';
|
|
|
|
}
|
|
|
|
|
|
|
|
/** @inheritDoc */
|
|
|
|
public function provideBundleSize() {
|
|
|
|
$bundleSizeConfig = json_decode( file_get_contents( $this->getBundleSizeConfig() ), true );
|
|
|
|
foreach ( $bundleSizeConfig[ 'modules' ] as $testCase ) {
|
|
|
|
yield $testCase['resourceModule'] => [ $testCase ];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|