- // Just under the limit
- $chunks = $wgAPIMaxResultSize / 100 - 1;
-
- for ( $i = 0; $i < $chunks; $i++ ) {
- $wgUrlProtocols[] = substr( str_repeat( "$i ", 50 ), 0, 100 );
- }
+ $this->setMwGlobals( 'wgUrlProtocols', [ $protocol ] );
+ $this->setMwGlobals( 'wgAPIMaxResultSize', strlen( $protocol ) );