Move php source files

Move php source files to scr. This allows jenkins to calculate the test
coverage.

Bug: T126034
Change-Id: If012c6a4fce0fdeaa5a63dad23210a42d1fc80e6
This commit is contained in:
Moritz Schubotz (physikerwelt) 2018-04-23 15:05:15 +02:00
parent 600d6867b0
commit 6e28bf8743
No known key found for this signature in database
GPG Key ID: 73D26C61BAB32E94
17 changed files with 27 additions and 27 deletions

View File

@ -13,25 +13,25 @@
"callback": "MathHooks::registerExtension", "callback": "MathHooks::registerExtension",
"type": "parserhook", "type": "parserhook",
"AutoloadClasses": { "AutoloadClasses": {
"MathMathSymbolsDataModule": "MathMathSymbolsDataModule.php", "MathMathSymbolsDataModule": "src/MathMathSymbolsDataModule.php",
"MathChemSymbolsDataModule": "MathChemSymbolsDataModule.php", "MathChemSymbolsDataModule": "src/MathChemSymbolsDataModule.php",
"MathHooks": "MathHooks.php", "MathHooks": "src/MathHooks.php",
"MathRenderer": "MathRenderer.php", "MathRenderer": "src/MathRenderer.php",
"MathRestbaseInterface": "MathRestbaseInterface.php", "MathRestbaseInterface": "src/MathRestbaseInterface.php",
"MathTexvc": "MathTexvc.php", "MathTexvc": "MathTexvc.php",
"MathSource": "MathSource.php", "MathSource": "src/MathSource.php",
"MathMathML": "MathMathML.php", "MathMathML": "src/MathMathML.php",
"MathMathMLCli": "MathMathMLCli.php", "MathMathMLCli": "src/MathMathMLCli.php",
"MathLaTeXML": "MathLaTeXML.php", "MathLaTeXML": "MathLaTeXML.php",
"MathInputCheck": "MathInputCheck.php", "MathInputCheck": "src/MathInputCheck.php",
"MathInputCheckTexvc": "MathInputCheckTexvc.php", "MathInputCheckTexvc": "MathInputCheckTexvc.php",
"MathInputCheckRestbase": "MathInputCheckRestbase.php", "MathInputCheckRestbase": "src/MathInputCheckRestbase.php",
"SpecialMathShowImage": "SpecialMathShowImage.php", "SpecialMathShowImage": "src/SpecialMathShowImage.php",
"SpecialMathStatus": "SpecialMathStatus.php", "SpecialMathStatus": "src/SpecialMathStatus.php",
"MathValidator": "MathValidator.php", "MathValidator": "src/MathValidator.php",
"MathFormatter": "MathFormatter.php", "MathFormatter": "src/MathFormatter.php",
"MathWikidataHook": "MathWikidataHook.php", "MathWikidataHook": "src/MathWikidataHook.php",
"MathMLRdfBuilder": "MathMLRdfBuilder.php" "MathMLRdfBuilder": "src/MathMLRdfBuilder.php"
}, },
"DefaultUserOptions": { "DefaultUserOptions": {
"math": "mathml" "math": "mathml"

View File

@ -13,8 +13,8 @@ class MathChemSymbolsDataModule extends ResourceLoaderModule {
public function getScript( ResourceLoaderContext $context ) { public function getScript( ResourceLoaderContext $context ) {
return 've.ui.MWChemDialog.static.setSymbols(' . return 've.ui.MWChemDialog.static.setSymbols(' .
file_get_contents( __DIR__ . '/modules/ve-math/chemSymbols.json' ) . file_get_contents( __DIR__ . '/../modules/ve-math/chemSymbols.json' ) .
');'; ');';
} }
public function getDependencies( ResourceLoaderContext $context = null ) { public function getDependencies( ResourceLoaderContext $context = null ) {

View File

@ -328,14 +328,14 @@ class MathHooks {
if ( !in_array( $type, $map ) ) { if ( !in_array( $type, $map ) ) {
throw new Exception( "Math extension does not currently support $type database." ); throw new Exception( "Math extension does not currently support $type database." );
} }
$sql = __DIR__ . '/db/math.' . $type . '.sql'; $sql = __DIR__ . '/../db/math.' . $type . '.sql';
$updater->addExtensionTable( 'math', $sql ); $updater->addExtensionTable( 'math', $sql );
if ( in_array( 'latexml', MathRenderer::getValidModes() ) ) { if ( in_array( 'latexml', MathRenderer::getValidModes() ) ) {
if ( in_array( $type, [ 'mysql', 'sqlite', 'postgres' ] ) ) { if ( in_array( $type, [ 'mysql', 'sqlite', 'postgres' ] ) ) {
$sql = __DIR__ . '/db/mathlatexml.' . $type . '.sql'; $sql = __DIR__ . '/../db/mathlatexml.' . $type . '.sql';
$updater->addExtensionTable( 'mathlatexml', $sql ); $updater->addExtensionTable( 'mathlatexml', $sql );
if ( $type == 'mysql' ) { if ( $type == 'mysql' ) {
$sql = __DIR__ . '/db/patches/mathlatexml.mathml-length-adjustment.mysql.sql'; $sql = __DIR__ . '/../db/patches/mathlatexml.mathml-length-adjustment.mysql.sql';
$updater->modifyExtensionField( 'mathlatexml', 'math_mathml', $sql ); $updater->modifyExtensionField( 'mathlatexml', 'math_mathml', $sql );
} }
} else { } else {
@ -344,10 +344,10 @@ class MathHooks {
} }
if ( in_array( 'mathml', MathRenderer::getValidModes() ) ) { if ( in_array( 'mathml', MathRenderer::getValidModes() ) ) {
if ( in_array( $type, [ 'mysql', 'sqlite', 'postgres' ] ) ) { if ( in_array( $type, [ 'mysql', 'sqlite', 'postgres' ] ) ) {
$sql = __DIR__ . '/db/mathoid.' . $type . '.sql'; $sql = __DIR__ . '/../db/mathoid.' . $type . '.sql';
$updater->addExtensionTable( 'mathoid', $sql ); $updater->addExtensionTable( 'mathoid', $sql );
if ( $type == 'mysql' ) { if ( $type == 'mysql' ) {
$sql = __DIR__ . '/db/patches/mathoid.add_png.mysql.sql'; $sql = __DIR__ . '/../db/patches/mathoid.add_png.mysql.sql';
$updater->addExtensionField( 'mathoid', 'math_png', $sql ); $updater->addExtensionField( 'mathoid', 'math_png', $sql );
} }
} else { } else {

View File

@ -13,8 +13,8 @@ class MathMathSymbolsDataModule extends ResourceLoaderModule {
public function getScript( ResourceLoaderContext $context ) { public function getScript( ResourceLoaderContext $context ) {
return 've.ui.MWMathDialog.static.setSymbols(' . return 've.ui.MWMathDialog.static.setSymbols(' .
file_get_contents( __DIR__ . '/modules/ve-math/mathSymbols.json' ) . file_get_contents( __DIR__ . '/../modules/ve-math/mathSymbols.json' ) .
');'; ');';
} }
public function getDependencies( ResourceLoaderContext $context = null ) { public function getDependencies( ResourceLoaderContext $context = null ) {

View File

@ -75,8 +75,8 @@ class SpecialMathStatus extends SpecialPage {
* i.e. if the span element is generated right. * i.e. if the span element is generated right.
*/ */
public function testMathMLIntegration() { public function testMathMLIntegration() {
$svgRef = file_get_contents( __DIR__ .'/images/reference.svg' ); $svgRef = file_get_contents( __DIR__ . '/../images/reference.svg' );
$svgRefNoSpeech = file_get_contents( __DIR__ .'/images/reference-nospeech.svg' ); $svgRefNoSpeech = file_get_contents( __DIR__ . '/../images/reference-nospeech.svg' );
$renderer = MathRenderer::getRenderer( "a+b", [], 'mathml' ); $renderer = MathRenderer::getRenderer( "a+b", [], 'mathml' );
$this->assertTrue( $renderer->render( true ), "Rendering of a+b in plain MathML mode" ); $this->assertTrue( $renderer->render( true ), "Rendering of a+b in plain MathML mode" );
$real = str_replace( "\n", '', $renderer->getHtmlOutput() ); $real = str_replace( "\n", '', $renderer->getHtmlOutput() );