'TestRecentChangesHelper' => "$testDir/phpunit/includes/changes/TestRecentChangesHelper.php",
# tests/phpunit/includes/content
- 'DummyContentHandlerForTesting' => "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
+ 'DummyContentHandlerForTesting' =>
+ "$testDir/phpunit/mocks/content/DummyContentHandlerForTesting.php",
'DummyContentForTesting' => "$testDir/phpunit/mocks/content/DummyContentForTesting.php",
'DummyNonTextContentHandler' => "$testDir/phpunit/mocks/content/DummyNonTextContentHandler.php",
'DummyNonTextContent' => "$testDir/phpunit/mocks/content/DummyNonTextContent.php",
'PasswordTestCase' => "$testDir/phpunit/includes/password/PasswordTestCase.php",
# tests/phpunit/includes/resourceloader
- 'ResourceLoaderImageModuleTest' => "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
- 'ResourceLoaderImageModuleTestable' => "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
+ 'ResourceLoaderImageModuleTest' =>
+ "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
+ 'ResourceLoaderImageModuleTestable' =>
+ "$testDir/phpunit/includes/resourceloader/ResourceLoaderImageModuleTest.php",
# tests/phpunit/includes/specials
'SpecialPageTestBase' => "$testDir/phpunit/includes/specials/SpecialPageTestBase.php",
)*
\} # Close bracket
)
- (?<value>
+ (?<value>
(?:
(?&qstr) # Quoted val
|
<?php
-class MediaWikiPHPUnitTestListener extends PHPUnit_TextUI_ResultPrinter implements PHPUnit_Framework_TestListener {
+class MediaWikiPHPUnitTestListener
+ extends PHPUnit_TextUI_ResultPrinter implements PHPUnit_Framework_TestListener {
/**
* @var string
array(
'class' => 'ResourceLoaderImageModule',
'selectorWithoutVariant' => '.mw-ui-icon-{name}:after, .mw-ui-icon-{name}:before',
- 'selectorWithVariant' => '.mw-ui-icon-{name}-{variant}:after, .mw-ui-icon-{name}-{variant}:before',
+ 'selectorWithVariant' =>
+ '.mw-ui-icon-{name}-{variant}:after, .mw-ui-icon-{name}-{variant}:before',
'variants' => self::$commonImageVariants,
'images' => self::$commonImageData,
),
* @covers ResourceLoaderImageModule::getStyles
*/
public function testGetStyles( $module, $expected ) {
- $module = new ResourceLoaderImageModuleTestable( $module, __DIR__ . '/../../data/resourceloader' );
+ $module = new ResourceLoaderImageModuleTestable(
+ $module,
+ __DIR__ . '/../../data/resourceloader'
+ );
$styles = $module->getStyles( $this->getResourceLoaderContext() );
$this->assertEquals( $expected, $styles['all'] );
}
protected function getTestImage( $name ) {
$options = ResourceLoaderImageModuleTest::$commonImageData[$name];
$fileDescriptor = is_string( $options ) ? $options : $options['file'];
- $allowedVariants = is_array( $options ) && isset( $options['variants'] ) ? $options['variants'] : array();
+ $allowedVariants = is_array( $options ) &&
+ isset( $options['variants'] ) ? $options['variants'] : array();
$variants = array_fill_keys( $allowedVariants, array( 'color' => 'red' ) );
- return new ResourceLoaderImageTestable( $name, 'test', $fileDescriptor, $this->imagesPath, $variants );
+ return new ResourceLoaderImageTestable(
+ $name,
+ 'test',
+ $fileDescriptor,
+ $this->imagesPath,
+ $variants
+ );
}
public static function provideGetPath() {
$data = file_get_contents( $this->imagesPath . '/remove.svg' );
$dataConstructive = file_get_contents( $this->imagesPath . '/remove_variantize.svg' );
$this->assertEquals( $image->getImageData( $context, null, 'original' ), $data );
- $this->assertEquals( $image->getImageData( $context, 'destructive', 'original' ), $dataConstructive );
+ $this->assertEquals(
+ $image->getImageData( $context, 'destructive', 'original' ),
+ $dataConstructive
+ );
// Stub, since we don't know if we even have a SVG handler, much less what exactly it'll output
$this->assertEquals( $image->getImageData( $context, null, 'rasterized' ), 'RASTERIZESTUB' );
) );
$this->assertEquals(
$module->getScript( $context ),
- 'mw.log.error("JavaScript parse error: Parse error: Unexpected token; token } expected in file \'input\' on line 3");',
+ 'mw.log.error(' .
+ '"JavaScript parse error: Parse error: Unexpected token; ' .
+ 'token } expected in file \'input\' on line 3"' .
+ ');',
'Replace invalid syntax with error logging'
);
array( $params, new HashConfig( array( 'UseSiteJs' => false ) + $settings ), array(
'MediaWiki:Common.css' => array( 'type' => 'style' ),
) ),
- array( $params, new HashConfig( array( 'UseSiteJs' => false, 'UseSiteCss' => false ) ), array() ),
+ array( $params,
+ new HashConfig(
+ array( 'UseSiteJs' => false, 'UseSiteCss' => false )
+ ),
+ array()
+ ),
);
}