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",
"type": "parserhook",
"AutoloadClasses": {
"MathMathSymbolsDataModule": "MathMathSymbolsDataModule.php",
"MathChemSymbolsDataModule": "MathChemSymbolsDataModule.php",
"MathHooks": "MathHooks.php",
"MathRenderer": "MathRenderer.php",
"MathRestbaseInterface": "MathRestbaseInterface.php",
"MathMathSymbolsDataModule": "src/MathMathSymbolsDataModule.php",
"MathChemSymbolsDataModule": "src/MathChemSymbolsDataModule.php",
"MathHooks": "src/MathHooks.php",
"MathRenderer": "src/MathRenderer.php",
"MathRestbaseInterface": "src/MathRestbaseInterface.php",
"MathTexvc": "MathTexvc.php",
"MathSource": "MathSource.php",
"MathMathML": "MathMathML.php",
"MathMathMLCli": "MathMathMLCli.php",
"MathSource": "src/MathSource.php",
"MathMathML": "src/MathMathML.php",
"MathMathMLCli": "src/MathMathMLCli.php",
"MathLaTeXML": "MathLaTeXML.php",
"MathInputCheck": "MathInputCheck.php",
"MathInputCheck": "src/MathInputCheck.php",
"MathInputCheckTexvc": "MathInputCheckTexvc.php",
"MathInputCheckRestbase": "MathInputCheckRestbase.php",
"SpecialMathShowImage": "SpecialMathShowImage.php",
"SpecialMathStatus": "SpecialMathStatus.php",
"MathValidator": "MathValidator.php",
"MathFormatter": "MathFormatter.php",
"MathWikidataHook": "MathWikidataHook.php",
"MathMLRdfBuilder": "MathMLRdfBuilder.php"
"MathInputCheckRestbase": "src/MathInputCheckRestbase.php",
"SpecialMathShowImage": "src/SpecialMathShowImage.php",
"SpecialMathStatus": "src/SpecialMathStatus.php",
"MathValidator": "src/MathValidator.php",
"MathFormatter": "src/MathFormatter.php",
"MathWikidataHook": "src/MathWikidataHook.php",
"MathMLRdfBuilder": "src/MathMLRdfBuilder.php"
},
"DefaultUserOptions": {
"math": "mathml"

View File

@ -13,8 +13,8 @@ class MathChemSymbolsDataModule extends ResourceLoaderModule {
public function getScript( ResourceLoaderContext $context ) {
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 ) {

View File

@ -328,14 +328,14 @@ class MathHooks {
if ( !in_array( $type, $map ) ) {
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 );
if ( in_array( 'latexml', MathRenderer::getValidModes() ) ) {
if ( in_array( $type, [ 'mysql', 'sqlite', 'postgres' ] ) ) {
$sql = __DIR__ . '/db/mathlatexml.' . $type . '.sql';
$sql = __DIR__ . '/../db/mathlatexml.' . $type . '.sql';
$updater->addExtensionTable( 'mathlatexml', $sql );
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 );
}
} else {
@ -344,10 +344,10 @@ class MathHooks {
}
if ( in_array( 'mathml', MathRenderer::getValidModes() ) ) {
if ( in_array( $type, [ 'mysql', 'sqlite', 'postgres' ] ) ) {
$sql = __DIR__ . '/db/mathoid.' . $type . '.sql';
$sql = __DIR__ . '/../db/mathoid.' . $type . '.sql';
$updater->addExtensionTable( 'mathoid', $sql );
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 );
}
} else {

View File

@ -13,8 +13,8 @@ class MathMathSymbolsDataModule extends ResourceLoaderModule {
public function getScript( ResourceLoaderContext $context ) {
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 ) {

View File

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