mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-18 02:20:46 +00:00
7a8d5b9dc4
Initally used a new sniff with autofix (T333745) Bug: T332865 Change-Id: I73d2903fed7523826b71fc452a846dc4c6e85802
31 lines
667 B
PHP
31 lines
667 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Extension\Math\Tests;
|
|
|
|
use Generator;
|
|
use MediaWikiUnitTestCase;
|
|
|
|
/**
|
|
* @coversNothing
|
|
*/
|
|
class ServiceWiringTest extends MediaWikiUnitTestCase {
|
|
private const EXTENSION_PREFIX = 'Math.';
|
|
|
|
/**
|
|
* @dataProvider provideWiring
|
|
*/
|
|
public function testAllWiringsAreProperlyShaped( $name, $definition ): void {
|
|
$this->assertStringStartsWith( self::EXTENSION_PREFIX, $name );
|
|
$this->assertIsCallable( $definition );
|
|
}
|
|
|
|
public static function provideWiring(): Generator {
|
|
$wiring = require __DIR__ . '/../../../ServiceWiring.php';
|
|
|
|
foreach ( $wiring as $name => $definition ) {
|
|
yield $name => [ $name, $definition ];
|
|
}
|
|
}
|
|
|
|
}
|