2021-11-09 19:16:30 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace MediaWiki\Skins\Vector\Tests\Structure;
|
|
|
|
|
2024-06-12 18:39:06 +00:00
|
|
|
class BundleSizeTest extends \MediaWiki\Tests\Structure\BundleSizeTestBase {
|
2021-11-09 19:16:30 +00:00
|
|
|
|
|
|
|
/** @inheritDoc */
|
|
|
|
public function getBundleSizeConfig(): string {
|
|
|
|
return dirname( __DIR__, 3 ) . '/bundlesize.config.json';
|
|
|
|
}
|
2023-11-01 14:04:04 +00:00
|
|
|
|
|
|
|
/** @inheritDoc */
|
|
|
|
public function provideBundleSize() {
|
|
|
|
$bundleSizeConfig = json_decode( file_get_contents( $this->getBundleSizeConfig() ), true );
|
|
|
|
foreach ( $bundleSizeConfig[ 'modules' ] as $testCase ) {
|
|
|
|
yield $testCase['resourceModule'] => [ $testCase ];
|
|
|
|
}
|
|
|
|
}
|
2021-11-09 19:16:30 +00:00
|
|
|
}
|